Merge pull request #1554 from thaJeztah/18.09_backport_completion-import--platform

[18.09 backport] Add bash completion for `import --platform`
Upstream-commit: 2aa77af30f
Component: cli
This commit is contained in:
Brian Goff
2018-12-07 13:10:27 -08:00
committed by GitHub

View File

@ -2686,14 +2686,16 @@ _docker_image_images() {
_docker_image_import() {
case "$prev" in
--change|-c|--message|-m)
--change|-c|--message|-m|--platform)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--change -c --help --message -m" -- "$cur" ) )
local options="--change -c --help --message -m"
__docker_server_is_experimental && options+=" --platform"
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag '--change|-c|--message|-m')