Add bash completion for docker service {create,update} host options

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit f3b7f40aaf)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Harald Albers 2016-11-27 05:08:35 -08:00 committed by Victor Vieux
parent 555f65587e
commit e0654b40b7

View file

@ -2690,6 +2690,7 @@ _docker_service_update() {
--dns-search
--env-file
--group
--host
--mode
--name
--port
@ -2700,6 +2701,14 @@ _docker_service_update() {
_filedir
return
;;
--host)
case "$cur" in
*:)
__docker_complete_resolved_hostname
return
;;
esac
;;
--mode)
COMPREPLY=( $( compgen -W "global replicated" -- "$cur" ) )
return
@ -2723,6 +2732,8 @@ _docker_service_update() {
--dns-search-rm
--group-add
--group-rm
--host-add
--host-rm
--image
--port-add
--port-rm
@ -2737,6 +2748,14 @@ _docker_service_update() {
COMPREPLY=( $(compgen -g -- "$cur") )
return
;;
--host-add|--host-rm)
case "$cur" in
*:)
__docker_complete_resolved_hostname
return
;;
esac
;;
--image)
__docker_complete_image_repos_and_tags
return