-
Notifications
You must be signed in to change notification settings - Fork 30
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
Sorting of flags #69
Comments
After experimenting, the flags are listed in the order they appear in the code. Please confirm that is correct. |
I am not sure if how flags are listed is always the same (or always based on the code), actually, but we could add sorting to them - it's probably relatively easy... Right before the flags are templated out into the help display, we could do some analysis that sorts their order in the slice. It is likely the case that flags are almost always displayed in the order that they are appended, but flags that are inherited from parent subcommands may break this rule... That is, flags that are part of a parent subcommand may come out before or after depending on how the code runs. What kind of flag output sorting would you prefer to see? |
Thanks for the reply. A simple A-Z or Z-A would be great by the long name. |
We could add a couple calls to flaggy that enable flag output sorting. Then, right before output, we sort depending on which sorting method was chosen.
|
Thank sounds great. Thank you. |
I have reviewed the documentation and I don't see a way to sort the out put of the flags when -h(elp) is used. Is this possible and if not, is it something that can be added?
The text was updated successfully, but these errors were encountered: