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) \