completion: zsh: improve command tags
There's no need to use _alternative and repeat a lot of the code. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
9a397ea5ad
commit
9d760527ad
@ -235,10 +235,13 @@ __git_zsh_main ()
|
|||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
(command)
|
(command)
|
||||||
_alternative \
|
_tags common-commands alias-commands all-commands
|
||||||
'alias-commands:alias:__git_zsh_cmd_alias' \
|
while _tags; do
|
||||||
'common-commands:common:__git_zsh_cmd_common' \
|
_requested common-commands && __git_zsh_cmd_common
|
||||||
'all-commands:all:__git_zsh_cmd_all' && _ret=0
|
_requested alias-commands && __git_zsh_cmd_alias
|
||||||
|
_requested all-commands && __git_zsh_cmd_all
|
||||||
|
let _ret || break
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
(arg)
|
(arg)
|
||||||
local command="${words[1]}" __git_dir
|
local command="${words[1]}" __git_dir
|
||||||
|
Loading…
Reference in New Issue
Block a user