DockerCLI/vendor
Sebastiaan van Stijn 52ac568385
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>
(cherry picked from commit 462e08219d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-17 23:08:14 +02:00
..
dario.cat/mergo vendor: dario.cat/mergo v1.0.1 2024-09-12 23:56:12 +02:00
github.com cli/container: use github.com/moby/sys/capability for completions 2024-10-17 23:08:14 +02:00
go.etcd.io/etcd/raft/v3 vendor: github.com/docker/swarmkit 616e8db4c3b0 2022-03-16 15:39:52 +01:00
go.opentelemetry.io cli: add otel sdk tracing and metric providers to the core cli 2024-03-25 11:11:34 -05:00
golang.org/x vendor: golang.org/x/term v0.24.0 2024-10-14 13:31:10 +02:00
google.golang.org vendor: google.golang.org/grpc v1.66.2 2024-10-14 13:31:11 +02:00
gopkg.in/yaml.v2 vendor dependencies with go1.17 2022-03-26 19:48:14 +01:00
gotest.tools/v3 vendor: gotest.tools/v3 v3.5.1 2023-10-20 17:39:10 +02:00
tags.cncf.io/container-device-interface Update container-device-interface to v0.6.2 2023-11-04 01:18:41 +01:00
modules.txt cli/container: use github.com/moby/sys/capability for completions 2024-10-17 23:08:14 +02:00