mirror of https://github.com/docker/cli.git
Complete running containers correctly after docker rm -vf in Zsh
When using option-stacking the -f flag that controls completing running containers can be a part of another word of options, so use opt_args that contains the parsed arguments from _arguments to check for it instead. Signed-off-by: Segev Finer <segev208@gmail.com>
This commit is contained in:
parent
220c50abc1
commit
9258d941b2
|
@ -838,7 +838,7 @@ __docker_container_subcommand() {
|
|||
"($help -)*:containers:->values" && ret=0
|
||||
case $state in
|
||||
(values)
|
||||
if [[ ${words[(r)-f]} == -f || ${words[(r)--force]} == --force ]]; then
|
||||
if [[ -n ${opt_args[(i)-f]} || -n ${opt_args[(i)--force]} ]]; then
|
||||
__docker_complete_containers && ret=0
|
||||
else
|
||||
__docker_complete_stopped_containers && ret=0
|
||||
|
|
Loading…
Reference in New Issue