DockerCLI/cli/command/image
Sebastiaan van Stijn 099d4baeed
cli/command/image: add shell completion for --platform flags
With this patch, completion is provided for `--platform` flags:

    docker pull --platform<TAB>
    linux           linux/amd64     linux/arm/v5    linux/arm/v7    linux/arm64/v8  linux/riscv64   wasip1          windows
    linux/386       linux/arm       linux/arm/v6    linux/arm64     linux/ppc64le   linux/s390x     wasip1/wasm     windows/amd64

Note that `docker buildx build` (with BuildKit) does not yet provide completion;
it's provided through buildx, and uses a different format (accepting multiple
comma-separated platforms). Interestingly, tab-completion for `docker build`
currently uses completion for non-buildkit, and has some other issues that may
have to be looked into.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d42cf96e15)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-17 23:10:59 +02:00
..
build cli/command/image/build: fix nosec comment 2024-06-10 21:19:32 +02:00
testdata vendor: github.com/docker/docker 70e46f2c7c2d (v26.0.0-rc3-dev) 2024-03-16 16:53:20 +01:00
build.go cli/command/image: add shell completion for --platform flags 2024-10-17 23:10:59 +02:00
build_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
client_test.go vendor: github.com/docker/docker a736d0701c41 (master, v27.0.0-dev) 2024-06-10 17:41:09 +02:00
cmd.go Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
formatter_history.go linting: address else/if/elseif statements found by gocritic 2023-11-20 16:02:16 +01:00
formatter_history_test.go golangci-lint: enable dupword linter 2023-11-20 16:02:18 +01:00
history.go Enable completion for 'image' sub commands 2024-07-19 01:55:35 +02:00
history_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
import.go cli/command/image: add shell completion for --platform flags 2024-10-17 23:10:59 +02:00
import_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
inspect.go Enable completion for 'image' sub commands 2024-07-19 01:55:35 +02:00
inspect_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
list.go image/list: Add `--tree` flag 2024-08-16 19:40:26 +02:00
list_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
load.go Plumb contexts through commands 2023-12-12 22:30:16 +01:00
load_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
prune.go chore: remove backticks and resolve linting issues 2024-04-02 15:54:29 +02:00
prune_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
pull.go cli/command/image: add shell completion for --platform flags 2024-10-17 23:10:59 +02:00
pull_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
push.go cli/command/image: add shell completion for --platform flags 2024-10-17 23:10:59 +02:00
push_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
remove.go Enable completion for 'image' sub commands 2024-07-19 01:55:35 +02:00
remove_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
save.go Plumb contexts through commands 2023-12-12 22:30:16 +01:00
save_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
tag.go Plumb contexts through commands 2023-12-12 22:30:16 +01:00
tag_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00
tree.go Merge pull request #5519 from thaJeztah/27.x_backport_no_underline 2024-10-08 17:09:05 +02:00
trust.go Removed all mentions of "please" from docs and messages 2024-06-11 16:53:40 +02:00
trust_test.go replace uses of deprecated env.Patch() 2022-09-22 17:28:07 +02:00