From f80a33998f261002917c0d6192bc297e97d7de78 Mon Sep 17 00:00:00 2001 From: Steve Durrheimer Date: Sat, 29 Oct 2016 15:39:59 +0200 Subject: [PATCH] Move zsh completion logic to new subcommand: attach Signed-off-by: Steve Durrheimer --- contrib/completion/zsh/_docker | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 40aba4f137..2e87c483a8 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -507,15 +507,23 @@ __docker_container_commands() { } __docker_container_subcommand() { - local -a _command_args opts_help + local -a _command_args opts_help opts_attach_exec_run_start local expl help="--help" integer ret=1 + opts_attach_exec_run_start=( + "($help)--detach-keys=[Escape key sequence used to detach a container]:sequence:__docker_complete_detach_keys" + ) opts_help=("(: -)--help[Print usage]") case "$words[1]" in (attach) - __docker_subcommand && ret=0 + _arguments $(__docker_arguments) \ + $opts_help \ + $opts_attach_exec_run_start \ + "($help)--no-stdin[Do not attach stdin]" \ + "($help)--sig-proxy[Proxy all received signals to the process (non-TTY mode only)]" \ + "($help -):containers:__docker_complete_running_containers" && ret=0 ;; (commit) __docker_subcommand && ret=0 @@ -1644,12 +1652,7 @@ __docker_subcommand() { case "$words[1]" in (attach) - _arguments $(__docker_arguments) \ - $opts_help \ - $opts_attach_exec_run_start \ - "($help)--no-stdin[Do not attach stdin]" \ - "($help)--sig-proxy[Proxy all received signals to the process (non-TTY mode only)]" \ - "($help -):containers:__docker_complete_running_containers" && ret=0 + __docker_container_subcommand && ret=0 ;; (build) _arguments $(__docker_arguments) \