From 3a31074d34c825028a7fbbd1a2ea55a5793a3d01 Mon Sep 17 00:00:00 2001 From: Tom Milligan Date: Thu, 9 Aug 2018 16:37:47 +0100 Subject: [PATCH] Update docker plugin from upstream docker/cli (#7018) Update `docker` plugin from [docker/cli master](https://github.com/tommilligan/cli/blob/master/contrib/completion/zsh/_docker) - bugfix for `docker update` autocompletion: https://github.com/docker/cli/pull/1232 - added `scope` subcommand: https://github.com/docker/cli/pull/1227/files --- plugins/docker/_docker | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index df4b44961..31b83c777 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -431,7 +431,7 @@ __docker_complete_events_filter() { integer ret=1 declare -a opts - opts=('container' 'daemon' 'event' 'image' 'label' 'network' 'type' 'volume') + opts=('container' 'daemon' 'event' 'image' 'label' 'network' 'scope' 'type' 'volume') if compset -P '*='; then case "${${words[-1]%=*}#*=}" in @@ -461,6 +461,11 @@ __docker_complete_events_filter() { (network) __docker_complete_networks && ret=0 ;; + (scope) + local -a scope_opts + scope_opts=('local' 'swarm') + _describe -t scope-filter-opts "scope filter options" scope_opts && ret=0 + ;; (type) local -a type_opts type_opts=('container' 'daemon' 'image' 'network' 'volume') @@ -923,7 +928,7 @@ __docker_container_subcommand() { local state _arguments $(__docker_arguments) \ $opts_help \ - opts_create_run_update \ + $opts_create_run_update \ "($help -)*: :->values" && ret=0 case $state in (values)