completion: cleanup zsh wrapper
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>
This commit is contained in:
parent
9b795193a6
commit
2bcf694b18
@ -2689,21 +2689,13 @@ if [[ -n ${ZSH_VERSION-} ]]; then
|
|||||||
compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
|
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 ()
|
_git ()
|
||||||
{
|
{
|
||||||
emulate -L zsh
|
local _ret=1 cur cword prev
|
||||||
local _ret=1
|
cur=${words[CURRENT]}
|
||||||
__git_zsh_helper
|
prev=${words[CURRENT-1]}
|
||||||
|
let cword=CURRENT-1
|
||||||
|
emulate ksh -c __${service}_main
|
||||||
let _ret && _default -S '' && _ret=0
|
let _ret && _default -S '' && _ret=0
|
||||||
return _ret
|
return _ret
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user