From 8ef01e869ea55aa3eb860ee4e7e60a44a5d0ff81 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Wed, 1 Aug 2018 13:49:24 +0200 Subject: [PATCH] Only complete swarm specific options with orchestrator=swarm Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index e0fa07652..1c7409239 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -4435,8 +4435,9 @@ _docker_stack_deploy() { case "$cur" in -*) - local options="--compose-file -c --help --prune --resolve-image --with-registry-auth" - __docker_daemon_is_experimental && options+=" --bundle-file" + local options="--compose-file -c --help" + __docker_daemon_is_experimental && __docker_stack_orchestrator_is swarm && options+=" --bundle-file" + __docker_stack_orchestrator_is swarm && options+=" --prune --resolve-image --with-registry-auth" COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) ;; *)