Merge pull request #3577 from albers/completion-stack-config

Add bash completion for `docker stack config`
This commit is contained in:
Sebastiaan van Stijn 2022-04-30 11:00:36 +02:00 committed by GitHub
commit 49c56dad10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View File

@ -4832,6 +4832,7 @@ _docker_search() {
_docker_stack() { _docker_stack() {
local subcommands=" local subcommands="
config
deploy deploy
ls ls
ps ps
@ -4857,6 +4858,21 @@ _docker_stack() {
esac 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_stack_deploy() {
case "$prev" in case "$prev" in
--compose-file|-c) --compose-file|-c)

View File

@ -11,9 +11,6 @@ Usage: docker stack config [OPTIONS]
Outputs the final config file, after doing merges and interpolations Outputs the final config file, after doing merges and interpolations
Aliases:
config, cfg
Options: Options:
-c, --compose-file strings Path to a Compose file, or "-" to read from stdin -c, --compose-file strings Path to a Compose file, or "-" to read from stdin
--orchestrator string Orchestrator to use (swarm|kubernetes|all) --orchestrator string Orchestrator to use (swarm|kubernetes|all)