bash completion for labels on build, networks and volumes

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a2958aa18f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Harald Albers 2016-03-25 10:56:04 -07:00 committed by Sebastiaan van Stijn
parent cf1d012fda
commit 501b0c387d

View file

@ -637,6 +637,7 @@ _docker_build() {
--cpu-quota
--file -f
--isolation
--label
--memory -m
--memory-swap
--shm-size
@ -1324,11 +1325,14 @@ _docker_network_create() {
COMPREPLY=( $(compgen -W "$plugins" -- "$cur") )
return
;;
--label)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--aux-address --driver -d --gateway --help --internal --ip-range --ipam-driver --ipam-opt --ipv6 --opt -o --subnet" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--aux-address --driver -d --gateway --help --internal --ip-range --ipam-driver --ipam-opt --ipv6 --label --opt -o --subnet" -- "$cur" ) )
;;
esac
}
@ -2024,14 +2028,14 @@ _docker_volume_create() {
__docker_complete_plugins Volume
return
;;
--name|--opt|-o)
--label|--name|--opt|-o)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--driver -d --help --name --opt -o" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--driver -d --help --label --name --opt -o" -- "$cur" ) )
;;
esac
}