summaryrefslogtreecommitdiff
path: root/cmd/podman/system/prune.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-12-09 07:03:51 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2020-12-09 16:01:13 -0500
commit15cdcdca76f1cd21bd5f61edadec2fb7df307b1e (patch)
tree6aefc2f552cb3eb65d2ab359b02c7b0d6651acce /cmd/podman/system/prune.go
parent059c2ee739c156287237c07e07f497602bd9958d (diff)
downloadpodman-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/system/prune.go')
-rw-r--r--cmd/podman/system/prune.go3
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)
}