Skip to content

Allow positional arguments from ArgGroup take value separately #1761

@EverlastingBugstopper

Description

@EverlastingBugstopper

What are you trying to do?

I'm trying to create positional command line arguments that are exclusive, you can either set one or the other. I'd like to be able to use clap_derive with this so that they are boiled down to a single expiration: std::time::Duration field in an opt struct.

set expiration to 60 seconds

$ app set key value EX 60

set expiration to 6000 milliseconds

$ app set key value PX 6000

What have you tried already?

I haven't been sure what to try or if this is even supported :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parsingArea: Parser's logic and needs it changed somehow.C-enhancementCategory: Raise on the bar on expectationsS-wont-fixStatus: Closed as there is no plan to fix this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions