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>

SZEDER Gábor committed Oct 8, 2011 at 16:54 UTC f674bb80784683f65c20264ce20afdd0a7669ffd
1 file changed +7 -2
contrib/completion/git-completion.bash
+7 -2
@@ -485,8 +485,13 @@ _get_comp_words_by_ref ()
485 fi
486 fi
487
488 -# __gitcomp accepts 1, 2, 3, or 4 arguments
489 -# generates completion reply with compgen
488 +# Generates completion reply with compgen, appending a space to possible
489 +# completion words, if necessary.
490 +# It accepts 1 to 4 arguments:
491 +# 1: List of possible completion words.
492 +# 2: A prefix to be added to each possible completion word (optional).
493 +# 3: Generate possible completion matches for this word (optional).
494 +# 4: A suffix to be appended to each possible completion word (optional).
495 __gitcomp ()
496 {
497 local cur_="$cur"