From: Felipe Contreras Date: Sat, 19 May 2012 02:41:35 GMT Subject: [PATCH 2/2] completion: add support for backwards compatibility Message-ID: <1337395295-29162-3-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1337395295-29162-1-git-send-email-felipe.contreras@gmail.com> 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 --- contrib/completion/git-completion.bash | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 3cb106e..1689f99 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2700,6 +2700,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 -- 1.7.10.2