Merge pull request #26970 from wzhliang/restart-stopped-container

zsh: allow restarting stopped containers by id
Upstream-commit: 6b997739fe5f4de411ccf30be574ee11a2780018
Component: engine
This commit is contained in:
Vincent Demeester
2016-10-11 14:37:54 +02:00
committed by GitHub

View File

@ -1883,12 +1883,18 @@ __docker_subcommand() {
"($help -):old name:__docker_containers" \
"($help -):new name: " && ret=0
;;
(restart|stop)
(stop)
_arguments $(__docker_arguments) \
$opts_help \
"($help -t --time)"{-t=,--time=}"[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)" \
"($help -)*:containers:__docker_runningcontainers" && ret=0
;;
(restart)
_arguments $(__docker_arguments) \
$opts_help \
"($help -t --time)"{-t=,--time=}"[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)" \
"($help -)*:containers:__docker_containers_ids" && ret=0
;;
(rm)
_arguments $(__docker_arguments) \
$opts_help \