aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2011-10-08 16:54:35 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-21 14:38:22 -0700
commitf674bb80784683f65c20264ce20afdd0a7669ffd (patch)
tree8da550140b67d8a2605416140f24fc5a47c1dc9c /contrib/completion
parent6e97fccf0c77b15c86e25558d69ce54422ebcf92 (diff)
downloadgit-f674bb80784683f65c20264ce20afdd0a7669ffd.tar.gz
git-f674bb80784683f65c20264ce20afdd0a7669ffd.tar.xz
completion: document __gitcomp()
I always forget which argument is which, and got tired of figuring it out over and over again. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rwxr-xr-xcontrib/completion/git-completion.bash9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 888e8e10c..45cbd2b94 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -485,8 +485,13 @@ _get_comp_words_by_ref ()
fi
fi
-# __gitcomp accepts 1, 2, 3, or 4 arguments
-# generates completion reply with compgen
+# Generates completion reply with compgen, appending a space to possible
+# completion words, if necessary.
+# It accepts 1 to 4 arguments:
+# 1: List of possible completion words.
+# 2: A prefix to be added to each possible completion word (optional).
+# 3: Generate possible completion matches for this word (optional).
+# 4: A suffix to be appended to each possible completion word (optional).
__gitcomp ()
{
local cur_="$cur"