Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Cobra completions for run and create #5580

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
cc981e3
Share the container completions
albers Oct 22, 2024
d9766a3
Disable file completion for `--add-host`
albers Oct 23, 2024
98d5b03
Disable file completion for `--annotation`
albers Oct 23, 2024
55d4192
Add completion for `--attach`
albers Oct 23, 2024
75d8077
Disable file completion for `--blkio-weight*`
albers Oct 23, 2024
fe1db01
Disable file completion for `--cgroup-parent`
albers Oct 23, 2024
00e3b7c
Add completion for `--cgroupns`
albers Oct 23, 2024
4450f48
Disable file completion for `--cpu*`
albers Oct 23, 2024
285d0e3
Disable file completion for `--device-*`
albers Oct 23, 2024
14038a9
Disable file completion for `--dns*`
albers Oct 24, 2024
85ab121
Disable file completion for `--domainname`
albers Oct 24, 2024
9906847
Disable file completion for `--entrypoint`
albers Oct 23, 2024
6aba94e
Disable file completion for `--expose`
albers Oct 24, 2024
a5aa7c9
Disable file completion for `--gpus`
albers Oct 24, 2024
d963cfc
Disable file completion for `--group-add`
albers Oct 23, 2024
3ab5af7
Disable file completion for `--health-*`
albers Oct 23, 2024
e08a007
Disable file completion for `--hostname`
albers Oct 23, 2024
784ad51
Disable file completion for `--ip6*`
albers Oct 23, 2024
b9c7f6c
Add completion for `--ipc`
albers Oct 24, 2024
77fd7d7
Disable file completion for `--isolation`
albers Oct 24, 2024
33d870a
Disable file completion for `--kernel-memory`
albers Oct 24, 2024
846439c
Disable file completion for `--label`
albers Oct 24, 2024
0e4b312
Add completion for `--link`
albers Oct 24, 2024
93af729
Disable file completion for `--link-local-ip`
albers Oct 24, 2024
6a801bc
Disable file completion for `--log-*`
albers Oct 24, 2024
e27ff3b
Disable file completion for `--mac-address`
albers Oct 24, 2024
0135d7e
Disable file completion for `--memory*`
albers Oct 24, 2024
31f1f43
Disable file completion for `--mount`
albers Oct 24, 2024
b3703fa
Disable file completion for `--name`
albers Oct 24, 2024
39cd60b
Disable file completion for `--network-alias`
albers Oct 24, 2024
9817e32
Disable file completion for `--oom-score-adj`
albers Oct 24, 2024
5c96388
Add completion for `--pid`
albers Oct 24, 2024
968d758
Disable file completion for `--pids-limit`
albers Oct 24, 2024
39028ce
Disable file completion for `--publish`
albers Oct 24, 2024
a40ed99
Disable file completion for `--runtime`
albers Oct 24, 2024
ff9c684
Disable file completion for `--security-opt`
albers Oct 24, 2024
396d9e0
Disable file completion for `--shm-size`
albers Oct 24, 2024
09701fe
Disable file completion for `--stop-timeout`
albers Oct 24, 2024
a490538
Add completion for `--storage-opt`
albers Oct 24, 2024
0d65aca
Disable file completion for `--sysctl`
albers Oct 24, 2024
fd1d55a
Add completion for `--ulimit`
albers Oct 24, 2024
20538ac
Disable file completion for `--user`
albers Oct 24, 2024
b878f5e
Add completion for `--userns`
albers Oct 24, 2024
46db741
Disable file completion for `--uts`
albers Oct 24, 2024
8afd8dd
Add completion for `--volume-driver`
albers Oct 24, 2024
61e803c
Disable file completion for `--workdir`
albers Oct 24, 2024
fc12d09
Add completion for `--detach-keys`
albers Oct 24, 2024
eca980c
Improve completion for `--security-opt`
albers Oct 24, 2024
bdae758
Improve completion for `--log-driver` and `--log-opt`
albers Oct 26, 2024
32d7ff8
Fix function signatures (dockerCLI completion.APIClientProvider)
albers Oct 30, 2024
afda9f3
Improve completion for "--uts"
albers Oct 30, 2024
5624d2c
Add comments to linter exceptions
albers Oct 30, 2024
8362a23
Use constants in completion of `--cgroupns`
albers Oct 30, 2024
adcce2b
Improve completion for "--volume-driver"
albers Oct 30, 2024
a40ea78
Improve completion for "--log-driver"
albers Oct 30, 2024
3bc177b
Use constants in completion of IPCModes
albers Oct 30, 2024
33d3246
fixup! Add completion for `--pid`
albers Oct 30, 2024
ef6cca9
Use subtests
albers Oct 30, 2024
4378ab4
Handle null completions with a default callback
albers Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/command/container/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func addCompletions(cmd *cobra.Command, dockerCli command.Cli) {
_ = cmd.RegisterFlagCompletionFunc("cap-add", completeLinuxCapabilityNames)
_ = cmd.RegisterFlagCompletionFunc("cap-drop", completeLinuxCapabilityNames)
_ = cmd.RegisterFlagCompletionFunc("cgroup-parent", completion.NoComplete)
_ = cmd.RegisterFlagCompletionFunc("cgroupns", completion.FromList("host", "private"))
albers marked this conversation as resolved.
Show resolved Hide resolved
_ = cmd.RegisterFlagCompletionFunc("env", completion.EnvVarNames)
_ = cmd.RegisterFlagCompletionFunc("env-file", completion.FileNames)
_ = cmd.RegisterFlagCompletionFunc("network", completion.NetworkNames(dockerCli))
Expand Down