mirror of https://github.com/docker/cli.git
Merge pull request #1625 from albers/completion-stoppable
Complete paused containers on `docker stop`
This commit is contained in:
commit
3e8a23a7fb
|
@ -156,6 +156,11 @@ __docker_complete_containers_running() {
|
|||
__docker_complete_containers "$@" --filter status=running
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2120
|
||||
__docker_complete_containers_stoppable() {
|
||||
__docker_complete_containers "$@" --filter status=running --filter status=paused
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2120
|
||||
__docker_complete_containers_stopped() {
|
||||
__docker_complete_containers "$@" --filter status=exited
|
||||
|
@ -2176,7 +2181,7 @@ _docker_container_stop() {
|
|||
COMPREPLY=( $( compgen -W "--help --time -t" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
__docker_complete_containers_running
|
||||
__docker_complete_containers_stoppable
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue