From: Felipe Contreras Date: Wed, 28 Oct 2020 02:07:05 +0000 (-0600) Subject: completion: zsh: improve command tags X-Git-Tag: v2.30.0-rc0~105^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d760527addc576c87e9b0e66b63376e580b434a;p=thirdparty%2Fgit.git completion: zsh: improve command tags There's no need to use _alternative and repeat a lot of the code. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 858864f3fb..22d8e58fcc 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -235,10 +235,13 @@ __git_zsh_main () case $state in (command) - _alternative \ - 'alias-commands:alias:__git_zsh_cmd_alias' \ - 'common-commands:common:__git_zsh_cmd_common' \ - 'all-commands:all:__git_zsh_cmd_all' && _ret=0 + _tags common-commands alias-commands all-commands + while _tags; do + _requested common-commands && __git_zsh_cmd_common + _requested alias-commands && __git_zsh_cmd_alias + _requested all-commands && __git_zsh_cmd_all + let _ret || break + done ;; (arg) local command="${words[1]}" __git_dir