Closed rchady closed 9 years ago
help_now!
should do this. It raises an exception that Methadone interprets as an erroneous exit that will trigger the help, e.g.
help_now!("provide data on stdin or as a list of files") if ARGF.empty?
Let me know if that's not what you're looking for.
Re-open if my solution didn't work for you.
When using OptionParser, it is possible to output the full help after a custom message. I uses this when validating the arguments to my commands. Is it possible to do this using Methadone? For example, I am writing a command that processes ARGF, but if they do not provide something on STDIN, I want to be able to give them an error message that they need to provide some input and then re-print the normal output of command -h.