diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2012-05-19 04:41:35 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-20 14:48:28 -0700 |
commit | b0a4b2d2570974f2050b5d43828dd8146505753e (patch) | |
tree | e73c5222c1e92cacb30b0e97ceddfb36bedb1552 /contrib | |
parent | completion: rename internal helpers _git and _gitk (diff) | |
download | tgif-b0a4b2d2570974f2050b5d43828dd8146505753e.tar.xz |
completion: add support for backwards compatibility
Some people might be relying on _git and _gitk to define custom aliases,
unfortunately, commit 6b179ad (completion: add new __git_complete
helper) broke that support.
"bash: [: 1: unary operator expected"
This can be easily fixed by using __git_complete, but it's not meant to
be public.
Although _git and _gitk are probably not meant to be public, it's easy
to keep having support for them by having a wrapper to the proper
new function that is fully functional.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/completion/git-completion.bash | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 5d608a125b..ac29193b0c 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2702,6 +2702,18 @@ __git_complete () || complete -o default -o nospace -F $wrapper $1 } +# wrapper for backwards compatibility +_git () +{ + __git_wrap_main_git +} + +# wrapper for backwards compatibility +_gitk () +{ + __git_wrap_main_gitk +} + __git_complete git _main_git __git_complete gitk _main_gitk |