-
-
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
Make auto help optional #242
Comments
We've discussed a plugin system for commander, while I haven't had a chance to get much done on it recently my plan is for built-ins such as // plugins is a dictionary mapping names to functions
Command.prototype.help = plugins['help'] || defaultHelp // We use an anonymous function right now Right now help is a little more complex than this but hopefully we'll be able make it this simple. Lots of people have requested more flexible built-ins so this should let people do whatever they need without having to change commanders code and should provide a nice way to test new functionality before adding it to the core codebase. |
That is my main point currently with commander - an otherwise great library, so this feature would be really helpful. |
I'm working on this feature right now but it's a little more involved than I imagined, might be a while before I get to the pull request |
Not currently planning a plugin system, but keeping this bug open for now as an early request for being able to override automatic help behaviour. |
There is not currently a way to disable the auto-help, but from v3 there is This issue has not had any activity in years. It isn't likely to get acted on due to this report. Feel free to open a new issue if it comes up again, with new information and renewed interest. Thank you for your contributions. |
Still need this feature in great demand, as we want to add ASCii art for our CLI name at the front of the help message, and correct some help message auto-generated but not useful for our case. Appending on '--help' event won't help. Isn't this not supported in the short term? |
Commander v6.1 allows allows disabling the built-in help option: #1325 |
There may be some circumstances where
--help
or-h
should perform their.on("--help")
duties, but we may not want to print out the automatic help message..help
is already a method, so I propose a method like.helpFlags
that you could include in the usual parse chain that would take overriding help flags as an argument.--help
and-h
would still work by default, but you could do.helpFlags("-a, --ayudar")
to use those instead or even.helpFlags()
to prevent anything from outputting the help automatically.The text was updated successfully, but these errors were encountered: