Skip to content

Commit cea2321

Browse files
Fabian Wermelingergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7cdb096 commit cea2321

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3506,6 +3506,7 @@ fi
35063506
__git_func_wrap ()
35073507
{
35083508
local cur words cword prev
3509+
local __git_cmd_idx=0
35093510
_get_comp_words_by_ref -n =: cur words cword prev
35103511
$1
35113512
}

0 commit comments

Comments
 (0)