File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1768,6 +1768,9 @@ _docker_container_run_and_create() {
17681768 --io-maxiops
17691769 --isolation
17701770 "
1771+ __docker_daemon_is_experimental && options_with_args+="
1772+ --platform
1773+ "
17711774
17721775 local boolean_options="
17731776 --disable-content-trust=false
@@ -2472,10 +2475,15 @@ _docker_image_build() {
24722475 --quiet -q
24732476 --rm
24742477 "
2475- __docker_daemon_is_experimental && boolean_options+="
2476- --squash
2477- --stream
2478- "
2478+ if __docker_daemon_is_experimental ; then
2479+ options_with_args+="
2480+ --platform
2481+ "
2482+ boolean_options+="
2483+ --squash
2484+ --stream
2485+ "
2486+ fi
24792487
24802488 local all_options=" $options_with_args $boolean_options "
24812489
@@ -2687,12 +2695,21 @@ _docker_image_prune() {
26872695}
26882696
26892697_docker_image_pull () {
2698+ case " $prev " in
2699+ --platform)
2700+ return
2701+ ;;
2702+ esac
2703+
26902704 case " $cur " in
26912705 -* )
2692- COMPREPLY=( $( compgen -W " --all-tags -a --disable-content-trust=false --help" -- " $cur " ) )
2706+ local options=" --all-tags -a --disable-content-trust=false --help"
2707+ __docker_daemon_is_experimental && options+=" --platform"
2708+
2709+ COMPREPLY=( $( compgen -W " $options " -- " $cur " ) )
26932710 ;;
26942711 * )
2695- local counter=$( __docker_pos_first_nonflag)
2712+ local counter=$( __docker_pos_first_nonflag --platform )
26962713 if [ " $cword " -eq " $counter " ]; then
26972714 for arg in " ${COMP_WORDS[@]} " ; do
26982715 case " $arg " in
You can’t perform that action at this time.
0 commit comments