-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feat Request: Sort help commands alphabetically #625
Comments
You can also do this in your own code without needing any upstream changes by putting this before your program.commands.sort((a, b) => a._name.localeCompare(b._name)) |
#910 is the same request, but for options |
I think having commands sorted is a good default, but am concerned how many users over the years have carefully created custom orders for their help and would be disappointed by an enforced change. Do we need to provide an opt-out for sorting? |
I wouldn't even mind it being opt in to preserve backwards compatibility. |
This issue has not had any activity in over six months. It isn't likely to get acted on due to this report (although it is a reasonable suggestion). Feel free to open a new issue if it comes up again, with new information and renewed interest. Thank you for your contributions. |
Commander 7 allows: program.configureHelp({
sortSubcommands: true
}); |
One caveat: It appears this also sorts the default |
Either by default or through an option, the help text commands should be sorted alphabetically.
I can submit a PR if adding this line around here is sufficient. I'm not aware of any other usecases where this may cause a problem unless people are using weird characters in their command names. Works on my end anyway.
The text was updated successfully, but these errors were encountered: