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 Flags #25
Comments
There is a Thanks for submitting the issue :) |
Yeah, I started out by defining the help flag in help.go (next to the automagic version), and then special casing it by calling showAppHelp, or some such, after a check for the GlobalBool just before the version processing, but it was messy, and I don't really want to be customising cli if I can help it. I understand you have the help command, which I guess is aimed at providing help for other sub commands. In my case, I have no subcommands (although I may add some in this or other apps), and so the default behaviour is just for the process to start. All I was after was the auto-generated help and exit when people do the ubiquitous -h/ --help. Having to do " help" is surprising for most users - especially as -h/ --help do nothing (if you override the default top level action) so you don't get to see that there even /is/ a help command. Perhaps you could even expose something like that showAppHelp in the public cli API with an optional message which gives people the ability to invoke it at will with contextual information for the user. Just some thoughts. Anywho, thanks for the package =] |
Handling -h / --help should be pretty easy. Right now I think the flags package hijacks it but it shouldn't be too hard to trigger trigger the help action when those flags are present. I will start working on this sometime tomorrow. Thanks Sent from my iPhone On Jul 23, 2013, at 9:10 PM, Sam Duncan notifications@github.com wrote:
|
JMS #25: Added support for help flags
Hi, is it a conscious design decision not to have help flags? I just wonder because this seems nasty but I don't know how else to do it.
Or maybe I'm just missing something fundamental =]
The text was updated successfully, but these errors were encountered: