diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index d5d9a84a13..ed269109db 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -4832,6 +4832,7 @@ _docker_search() { _docker_stack() { local subcommands=" + config deploy ls ps @@ -4857,6 +4858,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() { case "$prev" in --compose-file|-c) 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)