Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
completion: cleanup zsh wrapper
author
Felipe Contreras
<felipe.contreras@gmail.com>
Wed, 8 May 2013 07:37:00 +0000
(
02:37
-0500)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 8 May 2013 18:44:30 +0000
(11:44 -0700)
There's no need for a separate function; we can call
'emulate -k ksh func'.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
9b79519
)
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index b97162f38196d82b2f39f2b151e279d0569f8440..84dbf19948de6685ee769aa514e3179989b802de 100644
(file)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-2689,21
+2689,13
@@
if [[ -n ${ZSH_VERSION-} ]]; then
compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
}
- __git_zsh_helper ()
- {
- emulate -L ksh
- local cur cword prev
- cur=${words[CURRENT-1]}
- prev=${words[CURRENT-2]}
- let cword=CURRENT-1
- __${service}_main
- }
-
_git ()
{
- emulate -L zsh
- local _ret=1
- __git_zsh_helper
+ local _ret=1 cur cword prev
+ cur=${words[CURRENT]}
+ prev=${words[CURRENT-1]}
+ let cword=CURRENT-1
+ emulate ksh -c __${service}_main
let _ret && _default -S '' && _ret=0
return _ret
}