Merge pull request #30940 from sdurrheimer/zsh-completion-swarm-unlock-cmds

Add zsh completion for 'docker swarm unlock|unlock-key' commands
(cherry picked from commit 27ab008626)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2017-02-12 23:35:46 -08:00 committed by Sebastiaan van Stijn
parent 9287b8f99e
commit d4897c746f
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -2065,6 +2065,8 @@ __docker_swarm_commands() {
"join:Join a swarm as a node and/or manager"
"join-token:Manage join tokens"
"leave:Leave a swarm"
"unlock:Unlock swarm"
"unlock-key:Manage the unlock key"
"update:Update the swarm"
)
_describe -t docker-swarm-commands "docker swarm command" _docker_swarm_subcommands
@ -2114,6 +2116,16 @@ __docker_swarm_subcommand() {
$opts_help \
"($help -f --force)"{-f,--force}"[Force this node to leave the swarm, ignoring warnings]" && ret=0
;;
(unlock)
_arguments $(__docker_arguments) \
$opts_help && ret=0
;;
(unlock-key)
_arguments $(__docker_arguments) \
$opts_help \
"($help -q --quiet)"{-q,--quiet}"[Only display token]" \
"($help)--rotate[Rotate unlock token]" && ret=0
;;
(update)
_arguments $(__docker_arguments) \
$opts_help \