DockerCLI/vendor/github.com/moby
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
..
docker-image-spec vendor: github.com/docker/docker 86b86412a1b7 (v26.0-dev) 2024-02-10 12:26:39 +01:00
patternmatcher replace dockerfile/dockerignore with patternmatcher/ignorefile 2023-08-23 12:09:12 +02:00
swarmkit/v2 vendor: github.com/moby/swarmkit/v2 v2.0.0-20240611172349-ea1a7cec35cb 2024-06-18 14:32:49 +02:00
sys cli/container: use github.com/moby/sys/capability for completions 2024-10-01 14:01:02 +02:00
term vendor: github.com/moby/term v0.5.0 2023-05-02 14:22:36 +02:00