From: SZEDER Gábor Date: Sat, 8 Oct 2011 14:54:35 +0000 (+0200) Subject: completion: document __gitcomp() X-Git-Tag: v1.7.9-rc0~81^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f674bb80784683f65c20264ce20afdd0a7669ffd;p=git.git 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 Signed-off-by: Junio C Hamano --- 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"