Move zsh completion logic to new subcommand: stats

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
Steve Durrheimer 2016-10-30 18:41:39 +01:00 committed by Tibor Vass
parent 2fd33da75f
commit 5323c46677
1 changed files with 7 additions and 7 deletions

View File

@ -805,7 +805,12 @@ __docker_container_subcommand() {
"($help -)*:containers:__docker_complete_stopped_containers" && ret=0 "($help -)*:containers:__docker_complete_stopped_containers" && ret=0
;; ;;
(stats) (stats)
__docker_subcommand && ret=0 _arguments $(__docker_arguments) \
$opts_help \
"($help -a --all)"{-a,--all}"[Show all containers (default shows just running)]" \
"($help)--format=[Pretty-print images using a Go template]:template: " \
"($help)--no-stream[Disable streaming stats and only pull the first result]" \
"($help -)*:containers:__docker_complete_running_containers" && ret=0
;; ;;
(stop) (stop)
__docker_subcommand && ret=0 __docker_subcommand && ret=0
@ -2190,12 +2195,7 @@ __docker_subcommand() {
__docker_container_subcommand && ret=0 __docker_container_subcommand && ret=0
;; ;;
(stats) (stats)
_arguments $(__docker_arguments) \ __docker_container_subcommand && ret=0
$opts_help \
"($help -a --all)"{-a,--all}"[Show all containers (default shows just running)]" \
"($help)--format=[Pretty-print images using a Go template]:template: " \
"($help)--no-stream[Disable streaming stats and only pull the first result]" \
"($help -)*:containers:__docker_complete_running_containers" && ret=0
;; ;;
(swarm) (swarm)
local curcontext="$curcontext" state local curcontext="$curcontext" state