1
0
mirror of https://github.com/git/git.git synced 2024-10-21 08:08:16 +02:00
git/contrib/completion
SZEDER Gábor 2f779f9176 completion: extract completing ctags symbol names into helper function
The previous commit doubled the number of __git_match_ctag()'s
positional parameters, and, to keep the position of existing
parameters for the sake of backwards compatibility, the prefix,
current word and suffix parameters ended up in different order than in
other functions accepting the same parameters.  Then there is a
condition checking the existence of the tag file before invoking this
function.

We could still live with this if there were only a single callsite,
but the next commit will add a few more, so it's worth providing a
cleaner interface.

Add the wrapper function __git_complete_symbol(), which encompasses
the condition for checking the presence of the tag file and filling
COMPREPLY, and accepts '--opt=val'-style options with default values
that keep callsites simpler.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-23 13:31:24 -07:00
..
git-completion.bash completion: extract completing ctags symbol names into helper function 2017-03-23 13:31:24 -07:00
git-completion.tcsh
git-completion.zsh completion: fill COMPREPLY directly when completing refs 2017-03-23 11:18:22 -07:00
git-prompt.sh Merge branch 'vs/prompt-avoid-unset-variable' into maint 2016-07-06 13:06:38 -07:00