Skip to content

Commit 2cf4cfa

Browse files
committed
Merge branch 'fc/git-complete-helper-fix'
* fc/git-complete-helper-fix: completion: put main git and gitk completion functions back into git namespace
2 parents 1dad5c1 + 93b291e commit 2cf4cfa

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

contrib/completion/git-completion.bash

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ _git_whatchanged ()
25992599
_git_log
26002600
}
26012601

2602-
_main_git ()
2602+
__git_main ()
26032603
{
26042604
local i c=1 command __git_dir
26052605

@@ -2650,7 +2650,7 @@ _main_git ()
26502650
fi
26512651
}
26522652

2653-
_main_gitk ()
2653+
__gitk_main ()
26542654
{
26552655
__git_has_doubledash && return
26562656

@@ -2705,22 +2705,22 @@ __git_complete ()
27052705
# wrapper for backwards compatibility
27062706
_git ()
27072707
{
2708-
__git_wrap_main_git
2708+
__git_wrap__git_main
27092709
}
27102710

27112711
# wrapper for backwards compatibility
27122712
_gitk ()
27132713
{
2714-
__git_wrap_main_gitk
2714+
__git_wrap__gitk_main
27152715
}
27162716

2717-
__git_complete git _main_git
2718-
__git_complete gitk _main_gitk
2717+
__git_complete git __git_main
2718+
__git_complete gitk __gitk_main
27192719

27202720
# The following are necessary only for Cygwin, and only are needed
27212721
# when the user has tab-completed the executable name and consequently
27222722
# included the '.exe' suffix.
27232723
#
27242724
if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
2725-
__git_complete git.exe _main_git
2725+
__git_complete git.exe __git_main
27262726
fi

t/t9902-completion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ run_completion ()
6363
local _cword
6464
_words=( $1 )
6565
(( _cword = ${#_words[@]} - 1 ))
66-
__git_wrap_main_git && print_comp
66+
__git_wrap__git_main && print_comp
6767
}
6868

6969
test_completion ()

0 commit comments

Comments
 (0)