From a53bdfa3be6a821b5093919c55f6995e1df35680 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Wed, 14 Dec 2016 08:52:07 -0800 Subject: [PATCH] Make bash completion for `docker stack deploy --bundle-file` experimental Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 7f9a13f710..46e0ce3625 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3514,8 +3514,10 @@ _docker_stack() { _docker_stack_deploy() { case "$prev" in --bundle-file) - _filedir dab - return + if __docker_is_experimental ; then + _filedir dab + return + fi ;; --compose-file|-c) _filedir yml @@ -3525,7 +3527,9 @@ _docker_stack_deploy() { case "$cur" in -*) - COMPREPLY=( $( compgen -W "--bundle-file --compose-file -c --help --with-registry-auth" -- "$cur" ) ) + local options="--compose-file -c --help --with-registry-auth" + __docker_is_experimental && options+=" --bundle-file" + COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) ;; esac }