Skip to content

How to generate mutually exlusive options that works with "many"? #181

Answered by pacak
VorpalBlade asked this question in Q&A
Discussion options

You must be logged in to vote

So Mode can be one of Default, Add or Smart where Default takes a single argument and both Add and Smart take multiple. Usage looks what we expect.

Now you are trying to pass both Default value (b) and Add value (-a a) which Mode can't represent.

If the idea to have multiple Mode items - you can nest them in some other structure and have a Vec of them.

Error message is a bit confusing, I'll see if it can be improved.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@pacak
Comment options

@VorpalBlade
Comment options

@pacak
Comment options

@VorpalBlade
Comment options

@pacak
Comment options

Answer selected by VorpalBlade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
parsing Running the parser to get results
2 participants