Skip to content

watch mode support #77

@theoephraim

Description

@theoephraim

Clear and concise description of the problem

My CLI has some commands which must be run in "watch mode". This means the process stays alive, and when some condition occurs, the handler is re-run. I was able to hack commander into doing this, although it was quite awkward. I'm not exactly sure yet what the ideal shape of things would be, but it's a use case worth supporting more natively.

Suggested solution

In commander, what helped make it possible was the existence of "hooks", as well as being able to attach arbitrary data to the ctx object. Will do some more digging into what I had set up, think about it, and post more details here.

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guide.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIncludes new features🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions