mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move bash completion logic to new subcommand: rm
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
58027826d4
commit
9fc4670b3b
1 changed files with 17 additions and 17 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue