Skip to content
New issue

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

Backport Bugfix/3861 to V3: Mangen not showing possible values #4146

Merged
merged 4 commits into from Aug 31, 2022

Conversation

Calder-Ty
Copy link
Contributor

This pull request cherry picks the commits from #4082 to fix #3861 for v3.

Calder-Ty and others added 3 commits August 26, 2022 22:54
This adds feature parity for mangen with the standard help output. Users
will now see the list of possible values for value arguments.

One change that was made to make this possible was adding the method
`get_possible_values` to the public API for an arg. I tried to think of
a way to get around this, but because this is the interface that the
help generation uses, and it is part of the crate public interface
I thing adding it as a part of the public API might be for the best.

cherry-pick to backport this fix to v3

fixes: clap-rs#3861
This makes sure we take into account the setting that possible args
is hidden

backporting to v3-master
@Calder-Ty Calder-Ty changed the title Bugfix/3861 backport Backport Bugfix/3861 to V3: Mangen not showing possible values Aug 30, 2022
@Calder-Ty Calder-Ty force-pushed the bugfix/3861_backport branch 2 times, most recently from bdaf096 to 9bf3cf2 Compare August 30, 2022 04:33
clap_mangen/src/render.rs Outdated Show resolved Hide resolved
Noticed that possible values would not show up for Positional arguments
as well. Decided to add the changes for those as well.
@Calder-Ty
Copy link
Contributor Author

Good catch. Dropped the interloping line

@epage epage merged commit 19c9222 into clap-rs:v3-master Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants