Move zsh completion logic to new subcommand: top

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
Steve Durrheimer 2016-10-30 18:44:48 +01:00 committed by Tibor Vass
parent 8361fc40e7
commit fe0cfed70c
1 changed files with 11 additions and 11 deletions

View File

@ -819,7 +819,16 @@ __docker_container_subcommand() {
"($help -)*:containers:__docker_complete_running_containers" && ret=0 "($help -)*:containers:__docker_complete_running_containers" && ret=0
;; ;;
(top) (top)
__docker_subcommand && ret=0 local state
_arguments $(__docker_arguments) \
$opts_help \
"($help -)1:containers:__docker_complete_running_containers" \
"($help -)*:: :->ps-arguments" && ret=0
case $state in
(ps-arguments)
_ps && ret=0
;;
esac
;; ;;
(update) (update)
__docker_subcommand && ret=0 __docker_subcommand && ret=0
@ -2221,16 +2230,7 @@ __docker_subcommand() {
"($help -):destination:__docker_repositories_with_tags" && ret=0 "($help -):destination:__docker_repositories_with_tags" && ret=0
;; ;;
(top) (top)
_arguments $(__docker_arguments) \ __docker_container_subcommand && ret=0
$opts_help \
"($help -)1:containers:__docker_complete_running_containers" \
"($help -)*:: :->ps-arguments" && ret=0
case $state in
(ps-arguments)
_ps && ret=0
;;
esac
;; ;;
(update) (update)
_arguments $(__docker_arguments) \ _arguments $(__docker_arguments) \