From 9c8dec9f0bf4e54763a90af4dd653f730425f599 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sat, 9 Mar 2019 14:41:41 +0100 Subject: [PATCH] Add bash completion for `network ls --filter dangling` 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 4e09dd5842..86c87b7e4b 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3333,6 +3333,10 @@ _docker_network_inspect() { _docker_network_ls() { local key=$(__docker_map_key_of_current_option '--filter|-f') case "$key" in + dangling) + COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) ) + return + ;; driver) __docker_complete_plugins_bundled --cur "${cur##*=}" --type Network --add macvlan return @@ -3357,7 +3361,7 @@ _docker_network_ls() { case "$prev" in --filter|-f) - COMPREPLY=( $( compgen -S = -W "driver id label name scope type" -- "$cur" ) ) + COMPREPLY=( $( compgen -S = -W "dangling driver id label name scope type" -- "$cur" ) ) __docker_nospace return ;;