Skip to content

Commit f674bb8

Browse files
szedergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6e97fcc commit f674bb8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,13 @@ _get_comp_words_by_ref ()
485485
fi
486486
fi
487487

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).
490495
__gitcomp ()
491496
{
492497
local cur_="$cur"

0 commit comments

Comments
 (0)