Only complete swarm specific options with orchestrator=swarm
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 8ef01e869e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
ee7705035c
commit
df806ee61c
@ -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" ) )
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user