diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-05-17 16:36:15 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-05-19 14:04:22 +0200 |
commit | 337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f (patch) | |
tree | 039aaeb1f249ea872981548095c45cb888c2b3af /cmd/podman/common | |
parent | 74f70315b30e9fdd3113181d94b2e64e505a05d5 (diff) | |
download | podman-337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f.tar.gz podman-337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f.tar.bz2 podman-337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f.zip |
shell completion: podman save --format use all valid values
docker-archive was missing from the completions. To prevent duplication
use the same format list as podman save.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r-- | cmd/podman/common/completion.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go index f207f6925..492e5bc01 100644 --- a/cmd/podman/common/completion.go +++ b/cmd/podman/common/completion.go @@ -25,6 +25,8 @@ var ( ChangeCmds = []string{"CMD", "ENTRYPOINT", "ENV", "EXPOSE", "LABEL", "ONBUILD", "STOPSIGNAL", "USER", "VOLUME", "WORKDIR"} // LogLevels supported by podman LogLevels = []string{"trace", "debug", "info", "warn", "warning", "error", "fatal", "panic"} + // ValidSaveFormats is the list of support podman save formats + ValidSaveFormats = []string{define.OCIManifestDir, define.OCIArchive, define.V2s2ManifestDir, define.V2s2Archive} ) type completeType int @@ -1192,10 +1194,8 @@ func AutocompletePsSort(cmd *cobra.Command, args []string, toComplete string) ([ } // AutocompleteImageSaveFormat - Autocomplete image save format options. -// -> "oci-archive", "oci-dir", "docker-dir" func AutocompleteImageSaveFormat(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { - formats := []string{"oci-archive", "oci-dir", "docker-dir"} - return formats, cobra.ShellCompDirectiveNoFileComp + return ValidSaveFormats, cobra.ShellCompDirectiveNoFileComp } // AutocompleteWaitCondition - Autocomplete wait condition options. |