Skip to content

How to add an extra, separate help option that overrides required arguments? #5501

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

You must be logged in to vote

--help is processed during the parsing process. A particularly important aspect id that this is processed before the struct is populated.

We offer exclusive but that has challenges with the derive API because the struct needs to be populated. You can switch the struct to using Option fields with explicit required = true to make that work.

Members of a group are exclusive by default. You can also declare groups to conflict with other groups. #2621 would help with some things but could run into #4697.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by obskyr
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