We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.5
#[derive(ValueEnum, Clone)] enum XxxMode { } #[clap( long, value_enum, )] mode: XxxMode,
--help does not print possible values of enum.
--help
The solution I've found:
#[clap( long, value_enum, possible_values = XxxMode::value_variants() .iter() .map(|v| v.to_possible_value().unwrap()), )] mode: XxxMode,
But it is not mentioned anywhere in documentation (e.g. in derive reference, or next to ValueEnum documentation).
ValueEnum
(Also it should probably be default behavior to print possible values for value_enum).
value_enum
No response
The text was updated successfully, but these errors were encountered:
Sorry, it works without this trick. Something didn't work before, but I don't know what I did when it didn't work.
Sorry, something went wrong.
No branches or pull requests
Please complete the following tasks
Clap Version
3.2.5
Describe your use case
--help
does not print possible values of enum.Describe the solution you'd like
The solution I've found:
But it is not mentioned anywhere in documentation (e.g. in derive reference, or next to
ValueEnum
documentation).(Also it should probably be default behavior to print possible values for
value_enum
).Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: