mirror of https://github.com/docker/cli.git
Move zsh completion logic to new subcommand: ps
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
a01c52a1a6
commit
f7dba85a99
|
@ -699,8 +699,18 @@ __docker_container_subcommand() {
|
||||||
"($help -)*:containers:__docker_complete_containers" && ret=0
|
"($help -)*:containers:__docker_complete_containers" && ret=0
|
||||||
;;
|
;;
|
||||||
(ls|list)
|
(ls|list)
|
||||||
words[1]="ps"
|
_arguments $(__docker_arguments) \
|
||||||
__docker_subcommand && ret=0
|
$opts_help \
|
||||||
|
"($help -a --all)"{-a,--all}"[Show all containers]" \
|
||||||
|
"($help)--before=[Show only container created before...]:containers:__docker_complete_containers" \
|
||||||
|
"($help)*"{-f=,--filter=}"[Filter values]:filter:__docker_complete_ps_filters" \
|
||||||
|
"($help)--format=[Pretty-print containers using a Go template]:template: " \
|
||||||
|
"($help -l --latest)"{-l,--latest}"[Show only the latest created container]" \
|
||||||
|
"($help -n --last)"{-n=,--last=}"[Show n last created containers (includes all states)]:n:(1 5 10 25 50)" \
|
||||||
|
"($help)--no-trunc[Do not truncate output]" \
|
||||||
|
"($help -q --quiet)"{-q,--quiet}"[Only show numeric IDs]" \
|
||||||
|
"($help -s --size)"{-s,--size}"[Display total file sizes]" \
|
||||||
|
"($help)--since=[Show only containers created since...]:containers:__docker_complete_containers" && ret=0
|
||||||
;;
|
;;
|
||||||
(pause)
|
(pause)
|
||||||
__docker_subcommand && ret=0
|
__docker_subcommand && ret=0
|
||||||
|
@ -2095,18 +2105,8 @@ __docker_subcommand() {
|
||||||
"($help -)2:port:_ports" && ret=0
|
"($help -)2:port:_ports" && ret=0
|
||||||
;;
|
;;
|
||||||
(ps)
|
(ps)
|
||||||
_arguments $(__docker_arguments) \
|
words[1]='ls'
|
||||||
$opts_help \
|
__docker_container_subcommand && ret=0
|
||||||
"($help -a --all)"{-a,--all}"[Show all containers]" \
|
|
||||||
"($help)--before=[Show only container created before...]:containers:__docker_complete_containers" \
|
|
||||||
"($help)*"{-f=,--filter=}"[Filter values]:filter:__docker_complete_ps_filters" \
|
|
||||||
"($help)--format=[Pretty-print containers using a Go template]:template: " \
|
|
||||||
"($help -l --latest)"{-l,--latest}"[Show only the latest created container]" \
|
|
||||||
"($help -n --last)"{-n=,--last=}"[Show n last created containers (includes all states)]:n:(1 5 10 25 50)" \
|
|
||||||
"($help)--no-trunc[Do not truncate output]" \
|
|
||||||
"($help -q --quiet)"{-q,--quiet}"[Only show numeric IDs]" \
|
|
||||||
"($help -s --size)"{-s,--size}"[Display total file sizes]" \
|
|
||||||
"($help)--since=[Show only containers created since...]:containers:__docker_complete_containers" && ret=0
|
|
||||||
;;
|
;;
|
||||||
(pull)
|
(pull)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
|
Loading…
Reference in New Issue