DockerCLI/cli/command
Sebastiaan van Stijn 462e08219d
cli/container: use github.com/moby/sys/capability for completions
We used a hard-coded list of capabilities that we copied from containerd,
but the new "capability" package allows use to have a maintained list
of capabilities.

There's likely still some improvements to be made;

First of all, the capability package could provide a function to get the list
of strings.

On the completion-side, we need to consider what format is most convenient;
currently we use the canonical name (uppercase and "CAP_" prefix), however,
tab-completion is case-sensitive by default, so requires the user to type
uppercase letters to filter the list of options.

Bash completion provides a `completion-ignore-case on` option to make completion
case-insensitive (https://askubuntu.com/a/87066), but it looks to be a global
option; the current cobra.CompletionOptions also don't provide this as an option
to be used in the generated completion-script.

Fish completion has `smartcase` (by default?) which matches any case if
all of the input is lowercase.

Zsh does not have a dedicated option, but allows setting matching-rules
(see https://superuser.com/a/1092328).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-01 14:01:02 +02:00
..
builder test spring-cleaning 2024-07-04 01:35:12 +02:00
checkpoint cli: improve argument validation output 2024-07-05 03:35:14 +02:00
commands remove exec, push, pull, ps, images, info from "legacy" commands 2022-04-08 16:55:39 +02:00
completion cli/command/completion: add FromList utility 2024-07-17 01:25:33 +02:00
config cli: improve argument validation output 2024-07-05 03:35:14 +02:00
container cli/container: use github.com/moby/sys/capability for completions 2024-10-01 14:01:02 +02:00
context Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
formatter Merge pull request #5468 from akerouanton/fix-ps-ipv6 2024-09-23 15:31:02 +02:00
idresolver Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
image vendor: github.com/docker/docker 164cae56ed95 (master, v-next) 2024-09-24 16:30:30 +02:00
inspect Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
manifest cli/command: fix n-constant format string in call (govet) 2024-08-26 13:52:49 +02:00
network Check that --ip-range is a CIDR address 2024-09-26 20:38:33 +01:00
node cli: improve argument validation output 2024-07-05 03:35:14 +02:00
plugin cli: improve argument validation output 2024-07-05 03:35:14 +02:00
registry Merge pull request #5401 from laurazard/login-non-tty-standardize 2024-09-03 16:36:14 +02:00
secret cli: improve argument validation output 2024-07-05 03:35:14 +02:00
service cli/command: fix n-constant format string in call (govet) 2024-08-26 13:52:49 +02:00
stack cli/command: fix n-constant format string in call (govet) 2024-08-26 13:52:49 +02:00
swarm cli: improve argument validation output 2024-07-05 03:35:14 +02:00
system info: stop printing "Expected" commits 2024-09-10 13:49:12 +02:00
task linting: address slice-append issues found by gocritic 2023-11-20 16:02:17 +01:00
testdata Dynamically register kubernetes context store endpoint type. 2019-05-20 13:28:11 +01:00
trust cli: improve argument validation output 2024-07-05 03:35:14 +02:00
volume align "conflicting options" errors for consistency 2024-10-01 12:08:56 +02:00
cli.go align "conflicting options" errors for consistency 2024-10-01 12:08:56 +02:00
cli_options.go add support for DOCKER_CUSTOM_HEADERS env-var (experimental) 2024-07-19 15:04:26 +02:00
cli_options_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00
cli_test.go add support for DOCKER_CUSTOM_HEADERS env-var (experimental) 2024-07-19 15:04:26 +02:00
context.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
context_test.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
defaultcontextstore.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
defaultcontextstore_test.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
registry.go vendor: github.com/docker/docker 164cae56ed95 (master, v-next) 2024-09-24 16:30:30 +02:00
registry_test.go linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
telemetry.go OTel: implement missing MeterProvider `ForceFlush` 2024-05-15 00:05:31 +01:00
telemetry_docker.go command: change drive to lowercase for wsl path 2024-09-18 10:59:08 +01:00
telemetry_docker_test.go command: change drive to lowercase for wsl path 2024-09-18 10:59:08 +01:00
telemetry_options.go cli: make initializing the global meter- and tracing providers optional 2024-06-24 15:44:20 +02:00
telemetry_utils.go telemetry: pass otel errors to the otel handler for shutdown and force flush 2024-09-17 10:47:04 -05:00
telemetry_utils_test.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
trust.go Refactor content_trust cli/flags handling 2018-03-08 15:00:43 -05:00
utils.go cli/command: fix n-constant format string in call (govet) 2024-08-26 13:52:49 +02:00
utils_test.go fix: ctx cancellation on login prompt 2024-07-02 12:07:16 +02:00