From 7cb11128f79983a267f9a2f232c4828ea54c7d97 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sat, 29 Oct 2016 04:26:08 -0700 Subject: [PATCH] Add bash completion for `docker ps --filter health` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index d8365af57d..ebd108d7c1 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -1089,6 +1089,10 @@ _docker_container_ls() { __docker_complete_containers_all --cur "${cur##*=}" --id return ;; + health) + COMPREPLY=( $( compgen -W "healthy starting none unhealthy" -- "${cur##*=}" ) ) + return + ;; is-task) COMPREPLY=( $( compgen -W "true false" -- "${cur##*=}" ) ) return @@ -1117,7 +1121,7 @@ _docker_container_ls() { case "$prev" in --filter|-f) - COMPREPLY=( $( compgen -S = -W "ancestor before exited id label name network since status volume" -- "$cur" ) ) + COMPREPLY=( $( compgen -S = -W "ancestor before exited health id label name network since status volume" -- "$cur" ) ) __docker_nospace return ;;