Add support for BuildKit specific options to bash completion

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2019-04-05 23:10:16 +02:00
parent ba9934d404
commit 7945010874
1 changed files with 24 additions and 2 deletions

View File

@ -2863,7 +2863,6 @@ _docker_image_build() {
" "
local boolean_options=" local boolean_options="
--compress
--disable-content-trust=false --disable-content-trust=false
--force-rm --force-rm
--help --help
@ -2872,16 +2871,35 @@ _docker_image_build() {
--quiet -q --quiet -q
--rm --rm
" "
if __docker_server_is_experimental ; then if __docker_server_is_experimental ; then
options_with_args+=" options_with_args+="
--platform --platform
" "
boolean_options+=" boolean_options+="
--squash --squash
--stream
" "
fi fi
if [ "$DOCKER_BUILDKIT" = "1" ] ; then
options_with_args+="
--output -o
--platform
--progress
--secret
--ssh
"
else
boolean_options+="
--compress
"
if __docker_server_is_experimental ; then
boolean_options+="
--stream
"
fi
fi
local all_options="$options_with_args $boolean_options" local all_options="$options_with_args $boolean_options"
case "$prev" in case "$prev" in
@ -2926,6 +2944,10 @@ _docker_image_build() {
esac esac
return return
;; ;;
--progress)
COMPREPLY=( $( compgen -W "auto plain tty" -- "$cur" ) )
return
;;
--tag|-t) --tag|-t)
__docker_complete_images --repo --tag __docker_complete_images --repo --tag
return return