mirror of https://github.com/docker/cli.git
Add bash completion for `docker build --network`
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
cb0862f411
commit
5b6fdb11a8
|
@ -1914,6 +1914,7 @@ _docker_image_build() {
|
||||||
--label
|
--label
|
||||||
--memory -m
|
--memory -m
|
||||||
--memory-swap
|
--memory-swap
|
||||||
|
--network
|
||||||
--shm-size
|
--shm-size
|
||||||
--tag -t
|
--tag -t
|
||||||
--ulimit
|
--ulimit
|
||||||
|
@ -1950,6 +1951,20 @@ _docker_image_build() {
|
||||||
__docker_complete_isolation
|
__docker_complete_isolation
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--network)
|
||||||
|
case "$cur" in
|
||||||
|
container:*)
|
||||||
|
__docker_complete_containers_all --cur "${cur#*:}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=( $( compgen -W "$(__docker_plugins --type Network) $(__docker_networks) container:" -- "$cur") )
|
||||||
|
if [ "${COMPREPLY[*]}" = "container:" ] ; then
|
||||||
|
__docker_nospace
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
return
|
||||||
|
;;
|
||||||
--tag|-t)
|
--tag|-t)
|
||||||
__docker_complete_image_repos_and_tags
|
__docker_complete_image_repos_and_tags
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue