aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-11-18 16:10:19 +0100
committerPaul Holzinger <paul.holzinger@web.de>2020-11-19 18:07:35 +0100
commit599b1ed839cdc288334c5cfc557fd37e798fa575 (patch)
tree35b7cead4a6c4c0cd152f973afd1faf7eb1699d1 /cmd/podman/pods
parent4434bd797842c3015c0e6132eaf2509fed370c26 (diff)
downloadpodman-599b1ed839cdc288334c5cfc557fd37e798fa575.tar.gz
podman-599b1ed839cdc288334c5cfc557fd37e798fa575.tar.bz2
podman-599b1ed839cdc288334c5cfc557fd37e798fa575.zip
Shell completion for podman ps and podman pod ps --filter
Add all available filter options for `podman ps` and `podman pod ps` to the completions. Refactor the code a bit to make it easier to handle key value pairs in completions. The `completeKeyValues` function helps to reduce code duplication. Also make use of the new filter logic in the completions. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/ps.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index 51c2e92f0..99d324411 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -57,8 +57,7 @@ func init() {
filterFlagName := "filter"
flags.StringSliceVarP(&inputFilters, filterFlagName, "f", []string{}, "Filter output based on conditions given")
- //TODO complete filters
- _ = psCmd.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
+ _ = psCmd.RegisterFlagCompletionFunc(filterFlagName, common.AutocompletePodPsFilters)
formatFlagName := "format"
flags.StringVar(&psInput.Format, formatFlagName, "", "Pretty-print pods to JSON or using a Go template")