From 85071bda33f5aa3aeee0f9feb371740b21f9c5f9 Mon Sep 17 00:00:00 2001 From: Steve Durrheimer Date: Sun, 28 Aug 2016 12:40:10 +0200 Subject: [PATCH] Replace zsh completion for 'docker volume create --name' by 'docker volume create {name}' Signed-off-by: Steve Durrheimer --- contrib/completion/zsh/_docker | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 8224c729f8..66dfeea9ef 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -463,6 +463,8 @@ __docker_complete_events_filter() { return ret } +# BO network + __docker_network_complete_ls_filters() { [[ $PREFIX = -* ]] && return 1 integer ret=1 @@ -650,6 +652,8 @@ __docker_network_subcommand() { return ret } +# EO network + # BO node __docker_node_complete_ls_filters() { @@ -1252,6 +1256,8 @@ __docker_swarm_subcommand() { # EO swarm +# BO volume + __docker_volume_complete_ls_filters() { [[ $PREFIX = -* ]] && return 1 integer ret=1 @@ -1332,12 +1338,12 @@ __docker_volume_subcommand() { case "$words[1]" in (create) - _arguments $(__docker_arguments) \ + _arguments $(__docker_arguments) -A '-*' \ $opts_help \ "($help -d --driver)"{-d=,--driver=}"[Volume driver name]:Driver name:(local)" \ "($help)*--label=[Set metadata for a volume]:label=value: " \ - "($help)--name=[Volume name]" \ - "($help)*"{-o=,--opt=}"[Driver specific options]:Driver option: " && ret=0 + "($help)*"{-o=,--opt=}"[Driver specific options]:Driver option: " \ + "($help -)1:Volume name: " && ret=0 ;; (inspect) _arguments $(__docker_arguments) \ @@ -1371,6 +1377,8 @@ __docker_volume_subcommand() { return ret } +# EO volume + __docker_caching_policy() { oldp=( "$1"(Nmh+1) ) # 1 hour (( $#oldp ))