Skip to content

Commit

Permalink
Merge pull request #3824 from thaJeztah/20.10_backport_unexperimental…
Browse files Browse the repository at this point in the history
…_platform

[20.10 backport] Remove "experimental" gates around "--platform" in bash completion
  • Loading branch information
thaJeztah committed Oct 21, 2022
2 parents 643e2e5 + 20e3951 commit e814bd0
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions contrib/completion/bash/docker
Expand Up @@ -1954,6 +1954,7 @@ _docker_container_run_and_create() {
--oom-score-adj
--pid
--pids-limit
--platform
--publish -p
--pull
--restart
Expand Down Expand Up @@ -1981,9 +1982,6 @@ _docker_container_run_and_create() {
--io-maxiops
--isolation
"
__docker_server_is_experimental && options_with_args+="
--platform
"

local boolean_options="
--disable-content-trust=false
Expand Down Expand Up @@ -2831,6 +2829,7 @@ _docker_image_build() {
--memory -m
--memory-swap
--network
--platform
--shm-size
--tag -t
--target
Expand All @@ -2851,9 +2850,6 @@ _docker_image_build() {
"

if __docker_server_is_experimental ; then
options_with_args+="
--platform
"
boolean_options+="
--squash
"
Expand All @@ -2862,7 +2858,6 @@ _docker_image_build() {
if [ "$DOCKER_BUILDKIT" = "1" ] ; then
options_with_args+="
--output -o
--platform
--progress
--secret
--ssh
Expand Down Expand Up @@ -2993,8 +2988,7 @@ _docker_image_import() {

case "$cur" in
-*)
local options="--change -c --help --message -m"
__docker_server_is_experimental && options+=" --platform"
local options="--change -c --help --message -m --platform"
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
;;
*)
Expand Down Expand Up @@ -3102,9 +3096,7 @@ _docker_image_pull() {

case "$cur" in
-*)
local options="--all-tags -a --disable-content-trust=false --help --quiet -q"
__docker_server_is_experimental && options+=" --platform"

local options="--all-tags -a --disable-content-trust=false --help --platform --quiet -q"
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
;;
*)
Expand Down

0 comments on commit e814bd0

Please sign in to comment.