mirror of https://github.com/docker/cli.git
Merge pull request #428 from albers/completion-stack-deploy
Improve bash completion for `stack deploy`
This commit is contained in:
commit
4b61f560b5
|
@ -4331,6 +4331,12 @@ _docker_stack_deploy() {
|
|||
__docker_daemon_is_experimental && options+=" --bundle-file"
|
||||
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag '--compose-file|-c|--bundle-file')
|
||||
if [ "$cword" -eq "$counter" ]; then
|
||||
__docker_complete_stacks
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -4408,6 +4414,7 @@ _docker_stack_rm() {
|
|||
;;
|
||||
*)
|
||||
__docker_complete_stacks
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue