mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update bash completion for docker service {create,update} {--mode,--endpoint-mode}
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
9d236d88b7
commit
a394490d38
1 changed files with 13 additions and 6 deletions
|
@ -1710,7 +1710,6 @@ _docker_service_update() {
|
||||||
--label -l
|
--label -l
|
||||||
--limit-cpu
|
--limit-cpu
|
||||||
--limit-memory
|
--limit-memory
|
||||||
--mode
|
|
||||||
--mount -m
|
--mount -m
|
||||||
--name
|
--name
|
||||||
--network
|
--network
|
||||||
|
@ -1733,6 +1732,18 @@ _docker_service_update() {
|
||||||
--help
|
--help
|
||||||
"
|
"
|
||||||
|
|
||||||
|
if [ "$subcommand" = "create" ] ; then
|
||||||
|
options_with_args="$options_with_args
|
||||||
|
--mode
|
||||||
|
"
|
||||||
|
|
||||||
|
case "$prev" in
|
||||||
|
--mode)
|
||||||
|
COMPREPLY=( $( compgen -W "global replicated" -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
if [ "$subcommand" = "update" ] ; then
|
if [ "$subcommand" = "update" ] ; then
|
||||||
options_with_args="$options_with_args
|
options_with_args="$options_with_args
|
||||||
--arg
|
--arg
|
||||||
|
@ -1750,7 +1761,7 @@ _docker_service_update() {
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
--endpoint-mode)
|
--endpoint-mode)
|
||||||
COMPREPLY=( $( compgen -W "DNSRR VIP" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "dnsrr vip" -- "$cur" ) )
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--env|-e)
|
--env|-e)
|
||||||
|
@ -1758,10 +1769,6 @@ _docker_service_update() {
|
||||||
__docker_nospace
|
__docker_nospace
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--mode)
|
|
||||||
COMPREPLY=( $( compgen -W "global replicated" -- "$cur" ) )
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
--network)
|
--network)
|
||||||
__docker_complete_networks
|
__docker_complete_networks
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue