From e0fe546c376170a656b17b92a8437312e856ba8f Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Sat, 1 Dec 2018 23:30:30 +0100 Subject: [PATCH] Add bash completion for `import --platform` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index f195a81ebd..0e1dd8e0af 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2681,14 +2681,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')