Merge pull request #1625 from albers/completion-stoppable

Complete paused containers on `docker stop`
This commit is contained in:
Brian Goff 2019-02-07 09:37:35 -08:00 committed by GitHub
commit 3e8a23a7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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
}