mirror of https://github.com/docker/cli.git
Move zsh completion logic to new subcommand: top
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
8361fc40e7
commit
fe0cfed70c
|
@ -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) \
|
||||||
|
|
Loading…
Reference in New Issue