Move zsh completion logic to new subcommand: attach
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
a9443b7388
commit
d5ca5c1e08
1 changed files with 11 additions and 8 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Reference in a new issue