Commit Graph

4 Commits

Author SHA1 Message Date
Daniel J Walsh e86fc60b84 Add autocompletions to be shared between buildah and podman
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>
2021-02-19 05:55:45 -05:00
Daniel J Walsh 65d9929a4f Add completions for --arch and --os
--arch and --os have a limited number of options, and these
should be filled in automatically.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-24 06:33:25 -05:00
Paul Holzinger 8af70b14e9 Add shared autocomplete functions for podman/buildah
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>
2020-09-29 11:46:57 +02:00
Paul Holzinger 08f65cc609 Shell Completion with cobra for login/logout flags
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>
2020-09-21 15:12:30 +02:00