From 14d7fe44145909ba1f22ec0ff8002812017f9b6f Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 29 Apr 2022 19:12:06 +0000 Subject: [PATCH 1/2] Add bash completion for `docker stack config` This adds bash completion for #3544. Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 5a1ec89f5a..f811eb3fe7 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -4882,6 +4882,7 @@ _docker_search() { _docker_stack() { local subcommands=" + config deploy ls ps @@ -4910,6 +4911,21 @@ _docker_stack() { esac } +_docker_stack_config() { + case "$prev" in + --compose-file|-c) + _filedir yml + return + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--compose-file -c --help --skip-interpolation" -- "$cur" ) ) + ;; + esac +} + _docker_stack_deploy() { __docker_complete_stack_orchestrator_options && return From 381fb1dbd7d99f355a913b3b00d9145901da3606 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 29 Apr 2022 19:15:38 +0000 Subject: [PATCH 2/2] Remove unsupported alias from `docker stack config` help output Signed-off-by: Harald Albers --- docs/reference/commandline/stack_config.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/reference/commandline/stack_config.md b/docs/reference/commandline/stack_config.md index 0d3ff490ea..5836bf887c 100644 --- a/docs/reference/commandline/stack_config.md +++ b/docs/reference/commandline/stack_config.md @@ -11,9 +11,6 @@ Usage: docker stack config [OPTIONS] Outputs the final config file, after doing merges and interpolations -Aliases: - config, cfg - Options: -c, --compose-file strings Path to a Compose file, or "-" to read from stdin --orchestrator string Orchestrator to use (swarm|kubernetes|all)