Add zsh completion for 'docker swarm unlock|unlock-key' commands
(cherry picked from commit 27ab0086263986033bde45d0c48423408cd653ea)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -2065,6 +2065,8 @@ __docker_swarm_commands() {
|
| 2065 | 2065 |
"join:Join a swarm as a node and/or manager" |
| 2066 | 2066 |
"join-token:Manage join tokens" |
| 2067 | 2067 |
"leave:Leave a swarm" |
| 2068 |
+ "unlock:Unlock swarm" |
|
| 2069 |
+ "unlock-key:Manage the unlock key" |
|
| 2068 | 2070 |
"update:Update the swarm" |
| 2069 | 2071 |
) |
| 2070 | 2072 |
_describe -t docker-swarm-commands "docker swarm command" _docker_swarm_subcommands |
| ... | ... |
@@ -2114,6 +2116,16 @@ __docker_swarm_subcommand() {
|
| 2114 | 2114 |
$opts_help \ |
| 2115 | 2115 |
"($help -f --force)"{-f,--force}"[Force this node to leave the swarm, ignoring warnings]" && ret=0
|
| 2116 | 2116 |
;; |
| 2117 |
+ (unlock) |
|
| 2118 |
+ _arguments $(__docker_arguments) \ |
|
| 2119 |
+ $opts_help && ret=0 |
|
| 2120 |
+ ;; |
|
| 2121 |
+ (unlock-key) |
|
| 2122 |
+ _arguments $(__docker_arguments) \ |
|
| 2123 |
+ $opts_help \ |
|
| 2124 |
+ "($help -q --quiet)"{-q,--quiet}"[Only display token]" \
|
|
| 2125 |
+ "($help)--rotate[Rotate unlock token]" && ret=0 |
|
| 2126 |
+ ;; |
|
| 2117 | 2127 |
(update) |
| 2118 | 2128 |
_arguments $(__docker_arguments) \ |
| 2119 | 2129 |
$opts_help \ |