-
Notifications
You must be signed in to change notification settings - Fork 553
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
help output: Order default runtime options #11
Comments
ideally would be sorted, a-z, by the long-form option name; |
At first we had an ordered hash implementation to keep the order of the options as they are added, but it was adding a lot of implementation issues. So we just use a Hash, because they will be ordered in 1.9 (and possibly in 1.8.8). |
this is a biggie when you are writting a cli script - I really need to know what my user help text looks like. No idea what the oerdered hash issues were - ignorance is bliss :) |
It should be a class configuration option, something along this line: class App < Thor If you provide a patch, I will merge it. But, sorry, I won't merge your whole stack because having test code in lib/thor.rb looks like a smell to me. |
I had in mind :ordered_help => true/false in the options hash of: Not sure what other methods it could be passed to.... |
The default should be the order you declare. You can always declare alphabetically. Github does not allow to reopen issues, so please do when you have a patch. |
Good point, the name is ambiguous. sorted_help is the accurate option name. |
Sometimes the output is:
Other times:
The text was updated successfully, but these errors were encountered: