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

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-11-27 05:08:35 -08:00
parent 9dc0c8ec32
commit f3b7f40aaf

View file

@ -2665,6 +2665,7 @@ _docker_service_update() {
--dns-search
--env-file
--group
--host
--mode
--name
--port
@ -2675,6 +2676,14 @@ _docker_service_update() {
_filedir
return
;;
--host)
case "$cur" in
*:)
__docker_complete_resolved_hostname
return
;;
esac
;;
--mode)
COMPREPLY=( $( compgen -W "global replicated" -- "$cur" ) )
return
@ -2698,6 +2707,8 @@ _docker_service_update() {
--dns-search-rm
--group-add
--group-rm
--host-add
--host-rm
--image
--port-add
--port-rm
@ -2712,6 +2723,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