Skip to content

CLI: first-class enum input -> flag (single --mode=a|b for a one-axis choice) #13

Description

@bdelanghe

Problem

When a verb's behavior is a single mutually-exclusive choice (mode A vs mode B), the natural model is one enum flag, e.g. --scope changed|all. It is unclear/undocumented how a z.enum([...]) input surfaces as a CLI flag, so authors fall back to multiple booleans — which then run into the "no boolean negation" gap (separate issue) and end up as two+ flags for one axis.

Request

  • First-class, documented mapping of a z.enum([...]) input to a CLI flag (--flag value, validated against the enum members, shown in help).
  • And/or a mutually-exclusive flag-group construct so a set of booleans can be declared as "pick at most one".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions