Move bash completion logic to new subcommand: rm

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-10-20 08:54:39 +02:00 committed by Tibor Vass
parent 2a9e70cf34
commit 39880d7731
1 changed files with 17 additions and 17 deletions

View File

@ -1280,7 +1280,22 @@ _docker_container_restart() {
}
_docker_container_rm() {
_docker_rm
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--force -f --help --link -l --volumes -v" -- "$cur" ) )
;;
*)
for arg in "${COMP_WORDS[@]}"; do
case "$arg" in
--force|-f)
__docker_complete_containers_all
return
;;
esac
done
__docker_complete_containers_stopped
;;
esac
}
_docker_container_run() {
@ -2538,22 +2553,7 @@ _docker_restart() {
}
_docker_rm() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--force -f --help --link -l --volumes -v" -- "$cur" ) )
;;
*)
for arg in "${COMP_WORDS[@]}"; do
case "$arg" in
--force|-f)
__docker_complete_containers_all
return
;;
esac
done
__docker_complete_containers_stopped
;;
esac
_docker_container_rm
}
_docker_rmi() {