Move zsh completion logic to new subcommand: start

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
Steve Durrheimer 2016-10-30 18:40:53 +01:00 committed by Tibor Vass
parent 15a2f1f74f
commit 2fd33da75f
1 changed files with 7 additions and 10 deletions

View File

@ -797,7 +797,12 @@ __docker_container_subcommand() {
esac esac
;; ;;
(start) (start)
__docker_subcommand && ret=0 _arguments $(__docker_arguments) \
$opts_help \
$opts_attach_exec_run_start \
"($help -a --attach)"{-a,--attach}"[Attach container's stdout/stderr and forward all signals]" \
"($help -i --interactive)"{-i,--interactive}"[Attach container's stding]" \
"($help -)*:containers:__docker_complete_stopped_containers" && ret=0
;; ;;
(stats) (stats)
__docker_subcommand && ret=0 __docker_subcommand && ret=0
@ -1802,9 +1807,6 @@ __docker_subcommand() {
"($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: " "($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: "
"($help)--memory-swap=[Total memory limit with swap]:Memory limit: " "($help)--memory-swap=[Total memory limit with swap]:Memory limit: "
) )
opts_start=(
"($help)--detach-keys=[Escape key sequence used to detach a container]:sequence:__docker_complete_detach_keys"
)
opts_update=( opts_update=(
"($help)--blkio-weight=[Block IO (relative weight), between 10 and 1000]:Block IO weight:(10 100 500 1000)" "($help)--blkio-weight=[Block IO (relative weight), between 10 and 1000]:Block IO weight:(10 100 500 1000)"
"($help)--kernel-memory=[Kernel memory limit in bytes]:Memory limit: " "($help)--kernel-memory=[Kernel memory limit in bytes]:Memory limit: "
@ -2185,12 +2187,7 @@ __docker_subcommand() {
esac esac
;; ;;
(start) (start)
_arguments $(__docker_arguments) \ __docker_container_subcommand && ret=0
$opts_help \
$opts_start \
"($help -a --attach)"{-a,--attach}"[Attach container's stdout/stderr and forward all signals]" \
"($help -i --interactive)"{-i,--interactive}"[Attach container's stding]" \
"($help -)*:containers:__docker_complete_stopped_containers" && ret=0
;; ;;
(stats) (stats)
_arguments $(__docker_arguments) \ _arguments $(__docker_arguments) \