completion: bash: fix late declaration of __git_cmd_idx
A recent update to contrib/completion/git-completion.bash causes bash to fail auto complete custom commands that are wrapped with __git_func_wrap. Declaring __git_cmd_idx=0 inside __git_func_wrap resolves the issue. Signed-off-by: Fabian Wermelinger <fabianw@mavt.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
7cdb096903
commit
cea232194d
@ -3506,6 +3506,7 @@ fi
|
|||||||
__git_func_wrap ()
|
__git_func_wrap ()
|
||||||
{
|
{
|
||||||
local cur words cword prev
|
local cur words cword prev
|
||||||
|
local __git_cmd_idx=0
|
||||||
_get_comp_words_by_ref -n =: cur words cword prev
|
_get_comp_words_by_ref -n =: cur words cword prev
|
||||||
$1
|
$1
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user