Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

"enum" type values #98

@mattgodbolt

Description

@mattgodbolt

I'd love a way to constrain a positional argument to "one of" a range of values only. For example, one of a selection of strings like "slow", "medium" or "fast" (for a --speed slow type argument). I couldn't see how to do it without just checking the string value afterwards (which is fine, but this seems like a common enough use case!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions