From 4f427a89cbc0814c25dd4b562ddf4ff4e568a005 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 17 Nov 2020 16:43:17 +0100 Subject: Align the podman ps --filter behavior with docker All of our filters worked exclusive resulting in `--filter status=created --filter status=exited` to return nothing. In docker filters with the same key work inclusive with the only exception being `label` which is exclusive. Filters with different keys always work exclusive. This PR aims to match the docker behavior with podman. Signed-off-by: Paul Holzinger --- cmd/podman/containers/ps.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index a9e2d2e35..642feb5e0 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -98,14 +98,6 @@ func checkFlags(c *cobra.Command) error { if listOpts.Last >= 0 && listOpts.Latest { return errors.Errorf("last and latest are mutually exclusive") } - // Filter on status forces all - for _, filter := range filters { - splitFilter := strings.SplitN(filter, "=", 2) - if strings.ToLower(splitFilter[0]) == "status" { - listOpts.All = true - break - } - } // Quiet conflicts with size and namespace and is overridden by a Go // template. if listOpts.Quiet { -- cgit v1.2.3-54-g00ecf