From 33e0bce89fdd804b0c6eb2d633450b87507eb03b Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sun, 20 Jan 2019 21:41:36 +0100 Subject: [PATCH] Complete paused containers on `docker stop` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index d4831387c0..9f5bb03071 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -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 @@ -2147,7 +2152,7 @@ _docker_container_stop() { COMPREPLY=( $( compgen -W "--help --time -t" -- "$cur" ) ) ;; *) - __docker_complete_containers_running + __docker_complete_containers_stoppable ;; esac }