-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: Show possible values in generated man file #4082
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving the man generation forward!
890245f
to
8308815
Compare
Appologies for the wait getting back on this feedback. The noted changes should be reflected in the latest updates |
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. fixes: clap-rs#3861
This makes sure we take into account the setting that possible args is hidden
Noticed that possible values would not show up for Positional arguments as well. Decided to add the changes for those as well.
Thanks! This was made against master which is v4. If you would like, you are welcome to cherry-pick this onto v3-master. |
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 ofa 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.
If that is not the best option, please let me know and i can go back and look at it.
fixes: #3861