mirror of https://github.com/docker/cli.git
Merge pull request #268 from albers/completion-swarm-ca
Add bash completion for `swarm ca`
This commit is contained in:
commit
afcc75ddfe
|
@ -3284,6 +3284,7 @@ _docker_service_update_and_create() {
|
|||
|
||||
_docker_swarm() {
|
||||
local subcommands="
|
||||
ca
|
||||
init
|
||||
join
|
||||
join-token
|
||||
|
@ -3304,6 +3305,24 @@ _docker_swarm() {
|
|||
esac
|
||||
}
|
||||
|
||||
_docker_swarm_ca() {
|
||||
case "$prev" in
|
||||
--ca-cert|--ca-key)
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
--cert-expiry|--external-ca)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--ca-cert --ca-key --cert-expiry --detach -d --external-ca --help --quiet -q --rotate" -- "$cur" ) )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_swarm_init() {
|
||||
case "$prev" in
|
||||
--advertise-addr)
|
||||
|
|
Loading…
Reference in New Issue