diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-12-09 07:03:51 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-12-09 16:01:13 -0500 |
commit | 15cdcdca76f1cd21bd5f61edadec2fb7df307b1e (patch) | |
tree | 6aefc2f552cb3eb65d2ab359b02c7b0d6651acce /cmd/podman | |
parent | 059c2ee739c156287237c07e07f497602bd9958d (diff) | |
download | podman-15cdcdca76f1cd21bd5f61edadec2fb7df307b1e.tar.gz podman-15cdcdca76f1cd21bd5f61edadec2fb7df307b1e.tar.bz2 podman-15cdcdca76f1cd21bd5f61edadec2fb7df307b1e.zip |
Add --filter to podman system prune
Also document the allowable filters in podman system prune, podman image prune
and podman container prune.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/system/prune.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/system/prune.go b/cmd/podman/system/prune.go index f57689584..5ee017581 100644 --- a/cmd/podman/system/prune.go +++ b/cmd/podman/system/prune.go @@ -46,6 +46,9 @@ func init() { flags.BoolVarP(&force, "force", "f", false, "Do not prompt for confirmation. The default is false") flags.BoolVarP(&pruneOptions.All, "all", "a", false, "Remove all unused data") flags.BoolVar(&pruneOptions.Volume, "volumes", false, "Prune volumes") + filterFlagName := "filter" + flags.StringArrayVar(&pruneOptions.Filter, filterFlagName, []string{}, "Provide filter values (e.g. 'label=<key>=<value>')") + _ = pruneCommand.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone) } |