1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

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
2 changed files with 16 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)