From fa0f470a5f43c11b611afcdfc47d1d985f98553c Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 27 Jun 2017 17:43:05 +0200 Subject: [PATCH] Add bash completion for `service create|update --network-(add|rm)` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 79209c2941..ea2e1e550a 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3154,6 +3154,8 @@ _docker_service_update_and_create() { --host-add --host-rm --image + --network-add + --network-rm --placement-pref-add --placement-pref-rm --publish-add @@ -3180,6 +3182,10 @@ _docker_service_update_and_create() { __docker_complete_image_repos_and_tags return ;; + --network-add|--network-rm) + __docker_complete_networks + return + ;; --placement-pref-add|--placement-pref-rm) COMPREPLY=( $( compgen -W "spread" -S = -- "$cur" ) ) __docker_nospace