mirror of https://github.com/docker/cli.git
Fix zsh completion
- List all containers on `docker rm -f` Signed-off-by: Tianyi Wang <capkurmagati@gmail.com>
This commit is contained in:
parent
e7ec7bbd33
commit
6a41b34f89
|
@ -1138,7 +1138,16 @@ __docker_subcommand() {
|
||||||
"($help -f --force)"{-f,--force}"[Force removal]" \
|
"($help -f --force)"{-f,--force}"[Force removal]" \
|
||||||
"($help -l --link)"{-l,--link}"[Remove the specified link and not the underlying container]" \
|
"($help -l --link)"{-l,--link}"[Remove the specified link and not the underlying container]" \
|
||||||
"($help -v --volumes)"{-v,--volumes}"[Remove the volumes associated to the container]" \
|
"($help -v --volumes)"{-v,--volumes}"[Remove the volumes associated to the container]" \
|
||||||
"($help -)*:containers:__docker_stoppedcontainers" && ret=0
|
"($help -)*:containers:->values" && ret=0
|
||||||
|
case $state in
|
||||||
|
(values)
|
||||||
|
if [[ ${words[(r)-f]} == -f || ${words[(r)--force]} == --force ]]; then
|
||||||
|
__docker_containers && ret=0
|
||||||
|
else
|
||||||
|
__docker_stoppedcontainers && ret=0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
(rmi)
|
(rmi)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
|
Loading…
Reference in New Issue