bash completion for new `docker network create` options

Signed-off-by: Harald Albers <github@albersweb.de>
master
Harald Albers 2015-10-18 05:42:23 -07:00 committed by Tibor Vass
parent 4e6212f389
commit a2bbb2c61c
1 changed files with 8 additions and 1 deletions

View File

@ -1052,6 +1052,13 @@ _docker_network_connect() {
_docker_network_create() {
case "$prev" in
--aux-address|--gateway|--ip-range|--opt|-o|--subnet)
return
;;
--ipam-driver)
COMPREPLY=( $( compgen -W "default" -- "$cur" ) )
return
;;
--driver|-d)
# no need to suggest drivers that allow one instance only
# (host, null)
@ -1062,7 +1069,7 @@ _docker_network_create() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--driver -d --help" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--aux-address --driver -d --gateway --help --ip-range --ipam-driver --opt -o --subnet" -- "$cur" ) )
;;
esac
}