Skip to content

group of arguments depending on another argument? #6066

Answered by epage
martinetd asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think that's quite possible as far as help goes, but I'd like to think I could get close behaviour-wise (perhaps with some post-checking...)

For help, what you want is either help_heading or next_help_heading and you can divide them by engine.

is there a better way to enforce only one of the flatten struct is not None (like arg group? ideally based on the engine option...)

Not at this time. You would at least need #4697 and #2621.

is there a way to repeat eng12-opt within both flatten structs? if I move it there running panics (rightfully) saying the option is listed twice and clap doesn't know what to do.

When we process arguments, we do it with an identifier which is curre…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@martinetd
Comment options

Answer selected by martinetd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants