-
-
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
Added basic argument ordering to clap_man #3373
Conversation
I updated as suggested, utilising display order, followed by an alphabetical ordering for options with equal display order. |
Looks like this needs to be rebased |
btw #3544 switched how we test |
Otherwise, the order of arguments changes, which AFAIK is not resettable. Also, see clap-rs/clap#3373 which exposes an internal method for reading derived order values for arguments.
@cgubbin do you plan to get back to this PR or should we close it? |
As its been several months without a response, I'm going to go ahead and close this. If/when you come back to this, feel free to open a new PR |
#3362 I have tried to add basic argument ordering to
clap_man
. To do this I had to reach up into the mainclap
crate, to expose the methodget_display_order()
.The added code is currently quite verbose because I am printing the
--help
argument first, and then printing the remaining arguments in order which has resulted in some duplication... This ordering makes sense to me but might not be the style wanted. I have also added a unit test to verify that the arguments appear in the desired order in both the Synopsis and Options sections of the manual.