Replace zsh completion for 'docker volume create --name' by 'docker volume create {name}'

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
Steve Durrheimer 2016-08-28 12:40:10 +02:00 committed by Tibor Vass
parent 7ebb7c738a
commit 1e95101ade
1 changed files with 11 additions and 3 deletions

View File

@ -463,6 +463,8 @@ __docker_complete_events_filter() {
return ret return ret
} }
# BO network
__docker_network_complete_ls_filters() { __docker_network_complete_ls_filters() {
[[ $PREFIX = -* ]] && return 1 [[ $PREFIX = -* ]] && return 1
integer ret=1 integer ret=1
@ -650,6 +652,8 @@ __docker_network_subcommand() {
return ret return ret
} }
# EO network
# BO node # BO node
__docker_node_complete_ls_filters() { __docker_node_complete_ls_filters() {
@ -1252,6 +1256,8 @@ __docker_swarm_subcommand() {
# EO swarm # EO swarm
# BO volume
__docker_volume_complete_ls_filters() { __docker_volume_complete_ls_filters() {
[[ $PREFIX = -* ]] && return 1 [[ $PREFIX = -* ]] && return 1
integer ret=1 integer ret=1
@ -1332,12 +1338,12 @@ __docker_volume_subcommand() {
case "$words[1]" in case "$words[1]" in
(create) (create)
_arguments $(__docker_arguments) \ _arguments $(__docker_arguments) -A '-*' \
$opts_help \ $opts_help \
"($help -d --driver)"{-d=,--driver=}"[Volume driver name]:Driver name:(local)" \ "($help -d --driver)"{-d=,--driver=}"[Volume driver name]:Driver name:(local)" \
"($help)*--label=[Set metadata for a volume]:label=value: " \ "($help)*--label=[Set metadata for a volume]:label=value: " \
"($help)--name=[Volume name]" \ "($help)*"{-o=,--opt=}"[Driver specific options]:Driver option: " \
"($help)*"{-o=,--opt=}"[Driver specific options]:Driver option: " && ret=0 "($help -)1:Volume name: " && ret=0
;; ;;
(inspect) (inspect)
_arguments $(__docker_arguments) \ _arguments $(__docker_arguments) \
@ -1371,6 +1377,8 @@ __docker_volume_subcommand() {
return ret return ret
} }
# EO volume
__docker_caching_policy() { __docker_caching_policy() {
oldp=( "$1"(Nmh+1) ) # 1 hour oldp=( "$1"(Nmh+1) ) # 1 hour
(( $#oldp )) (( $#oldp ))