Skip to content

Commit

Permalink
Merge pull request moby#30940 from sdurrheimer/zsh-completion-swarm-u…
Browse files Browse the repository at this point in the history
…nlock-cmds

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Feb 18, 2017
1 parent 9287b8f commit d4897c7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/completion/zsh/_docker
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit d4897c7

Please sign in to comment.