Skip to content

Support default refresh time for podman ps -w when no argument is provided #26005

@dpateriya

Description

@dpateriya

Feature request description

Currently, podman ps -w requires a mandatory argument, and fails with an error if none is given.
Proposing that if no argument is supplied, Podman should assume a default watch time (e.g., 1 or 2 seconds) instead of erroring out.

Motivation:

  • Improves user experience by allowing quick usage without needing to explicitly specify a timeout.

  • Aligns with behavior seen in other CLI tools where defaults are assumed for usability.

  • Provides backward compatibility, where users specifying a timeout explicitly are unaffected.

Current Behavior:

$ podman ps -w
Error: flag needs an argument: 'w' in -w
See 'podman ps --help'

Benefits:

  • Better UX for ad-hoc use
  • Simplifies scripting
  • Reduces potential errors/mistakes during quick commands

Suggest potential solution

$ podman ps -w
(watch every 1-2 seconds, then show running containers)

Additional context

Podman Version: 5.2.2

OS: RHEL 9

Related flags/commands: podman ps -w

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.0Breaking changes for Podman 6.0kind/featureCategorizes issue or PR as related to a new feature.triagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions