completion: put main git and gitk completion functions back into git namespace
Commit 7f02f3d7 (completion: rename internal helpers _git and _gitk, 2012-05-19) renamed said functions to _main_git() and _main_gitk(), respectively. By convention the name of our git-completion-specific functions start with '_git' or '__git' prefix, so rename those functions once again to put them back into our "namespace". Use the two underscore prefix, because _git_main() could be mistaken for the completion function of the (not yet existing) 'git main' command. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor committed
Jun 13, 2012 at 10:08 UTC
93b291e07169b3787a39d4cccd3e4f9730b029d2
2 files changed
+8
-8
contrib/completion/git-completion.bash
+7
-7
@@ -2599,7 +2599,7 @@ _git_whatchanged ()
2599
_git_log
2600
}
2601
2602
-_main_git ()
2602
+__git_main ()
2603
{
2604
local i c=1 command __git_dir
2605
@@ -2650,7 +2650,7 @@ _main_git ()
2650
fi
2651
}
2652
2653
-_main_gitk ()
2653
+__gitk_main ()
2654
{
2655
__git_has_doubledash && return
2656
@@ -2705,22 +2705,22 @@ __git_complete ()
2705
# wrapper for backwards compatibility
2706
_git ()
2707
{
2708
- __git_wrap_main_git
2708
+ __git_wrap__git_main
2709
}
2710
2711
# wrapper for backwards compatibility
2712
_gitk ()
2713
{
2714
- __git_wrap_main_gitk
2714
+ __git_wrap__gitk_main
2715
}
2716
2717
-__git_complete git _main_git
2718
-__git_complete gitk _main_gitk
2717
+__git_complete git __git_main
2718
+__git_complete gitk __gitk_main
2719
2720
# The following are necessary only for Cygwin, and only are needed
2721
# when the user has tab-completed the executable name and consequently
2722
# included the '.exe' suffix.
2723
#
2724
if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
2725
-__git_complete git.exe _main_git
2725
+__git_complete git.exe __git_main
2726
fi
t/t9902-completion.sh
+1
-1
@@ -63,7 +63,7 @@ run_completion ()
63
local _cword
64
_words=( $1 )
65
(( _cword = ${#_words[@]} - 1 ))
66
- __git_wrap_main_git && print_comp
66
+ __git_wrap__git_main && print_comp
67
}
68
69
test_completion ()