summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-05-24 10:35:36 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-05-24 16:07:38 +0200
commitd924c46dae55a8846f33ca3346f5c816df9fbf0d (patch)
tree48deecf04d7e0655dbabb44edad46c81d44892de /cmd/podman/common
parent8af98b342d69a1d4e865339d51448218eecaa995 (diff)
downloadpodman-d924c46dae55a8846f33ca3346f5c816df9fbf0d.tar.gz
podman-d924c46dae55a8846f33ca3346f5c816df9fbf0d.tar.bz2
podman-d924c46dae55a8846f33ca3346f5c816df9fbf0d.zip
autocomplete `podman search --filter`
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/completion.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go
index 099fc267e..c29218d01 100644
--- a/cmd/podman/common/completion.go
+++ b/cmd/podman/common/completion.go
@@ -8,6 +8,7 @@ import (
"strconv"
"strings"
+ libimageDefine "github.com/containers/common/libimage/define"
"github.com/containers/common/libnetwork/types"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/pkg/sysregistriesv2"
@@ -496,6 +497,11 @@ func AutocompleteImages(cmd *cobra.Command, args []string, toComplete string) ([
return getImages(cmd, toComplete)
}
+// AutocompleteImageSearchFilters - Autocomplate `search --filter`.
+func AutocompleteImageSearchFilters(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return libimageDefine.SearchFilters, cobra.ShellCompDirectiveNoFileComp
+}
+
// AutocompletePodExitPolicy - Autocomplete pod exit policy.
func AutocompletePodExitPolicy(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return config.PodExitPolicies, cobra.ShellCompDirectiveNoFileComp