Add zsh completion for 'docker ps --filter=network'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
ee8c512dc3
commit
60c435e7d0
1 changed files with 5 additions and 8 deletions
|
@ -292,6 +292,9 @@ __docker_complete_ps_filters() {
|
|||
(name)
|
||||
__docker_containers_names && ret=0
|
||||
;;
|
||||
(network)
|
||||
__docker_networks && ret=0
|
||||
;;
|
||||
(status)
|
||||
status_opts=('created' 'dead' 'exited' 'paused' 'restarting' 'running')
|
||||
_describe -t status-filter-opts "Status Filter Options" status_opts && ret=0
|
||||
|
@ -304,7 +307,7 @@ __docker_complete_ps_filters() {
|
|||
;;
|
||||
esac
|
||||
else
|
||||
opts=('ancestor' 'before' 'exited' 'id' 'label' 'name' 'since' 'status' 'volume')
|
||||
opts=('ancestor' 'before' 'exited' 'id' 'label' 'name' 'network' 'since' 'status' 'volume')
|
||||
_describe -t filter-opts "Filter Options" opts -qS "=" && ret=0
|
||||
fi
|
||||
|
||||
|
@ -1092,7 +1095,7 @@ __docker_subcommand() {
|
|||
$opts_help \
|
||||
"($help -a --all)"{-a,--all}"[Show all containers]" \
|
||||
"($help)--before=[Show only container created before...]:containers:__docker_containers" \
|
||||
"($help)*"{-f=,--filter=}"[Filter values]:filter:->filter-options" \
|
||||
"($help)*"{-f=,--filter=}"[Filter values]:filter:__docker_complete_ps_filters" \
|
||||
"($help)--format[Pretty-print containers using a Go template]:format: " \
|
||||
"($help -l --latest)"{-l,--latest}"[Show only the latest created container]" \
|
||||
"($help)-n[Show n last created containers, include non-running one]:n:(1 5 10 25 50)" \
|
||||
|
@ -1100,12 +1103,6 @@ __docker_subcommand() {
|
|||
"($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_containers" && ret=0
|
||||
|
||||
case $state in
|
||||
(filter-options)
|
||||
__docker_complete_ps_filters && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(pull)
|
||||
_arguments $(__docker_arguments) \
|
||||
|
|
Loading…
Reference in a new issue