Skip to content

Commit

Permalink
completion: document __gitcomp()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
SZEDER Gábor authored and Junio C Hamano committed Oct 21, 2011
1 parent 6e97fcc commit f674bb8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f674bb8

Please sign in to comment.