When attempting to port podman secrets to buildah secrets, I found
these autocompletions which could be shared between the projects.
Moving them to containers/common to allow sharing.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Both podman and buildah can use these completion functions.
In order to prevent duplication lets define them here.
The new automplete functions are:
- AutocompleteSubuidName
- AutocompleteSubgidName
- AutocompleteCapabilities
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
The PR containers/podman#6442 enables a new way to create
shell completions scripts. The shell completion is handled
by cobra and since the login/logout flags are defined here
the completion functions for this should be defined here
as well. For Reference see:
https://github.com/spf13/cobra/blob/master/shell_completions.md
I added a unit test to ensure that the flags have a
completion function set.
This could also be used by skopeo and buildah if
someone wants to implement such completions for them.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>