Merge pull request #28343 from albers/completion-build--network
Add bash completion for `docker build --network`
This commit is contained in:
commit
7ca953e66e
1 changed files with 15 additions and 0 deletions
|
@ -1914,6 +1914,7 @@ _docker_image_build() {
|
|||
--label
|
||||
--memory -m
|
||||
--memory-swap
|
||||
--network
|
||||
--shm-size
|
||||
--tag -t
|
||||
--ulimit
|
||||
|
@ -1950,6 +1951,20 @@ _docker_image_build() {
|
|||
__docker_complete_isolation
|
||||
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)
|
||||
__docker_complete_image_repos_and_tags
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue