
Neil Mitchell wrote:
This makes me curious. What's the use case where you want to allow the user to pass arguments on the command line, but you don't want that user to be able to use '--help' to find out what arguments may be passed?
I wanted to create a clone of an existing program that had no help option and instead gave the help output if it saw an invalid option.
When you don't want to bother defining the help options/descriptions? :p
(alternatively, you may wish to provide a more full-featured version like what darcs does by using a pager)
You can already do this with CmdArgs. If you use cmdArgsMode/process it returns a structure populated to say what to do next (i.e. display a help message), but you are welcome to do something different, or do what it says in a different way. However, I can see some people might want to remove help entirely, so I'll try and find a balance.
The point here was not so much removing --help, but rather that I want to have control over the 'standard' options (help,version,verbosity) in the same way as for the rest. My program might not have a version, so why offer --version? Or maybe I want a different name for it because the -V is already used for something else, which I cannot change for backwards compatibility. I might want another name for --help, for instance -h. The standard -? does not work in all shells/configurations and --help might look strange if all other options are of the one-dash-one-character sort. I would also like to configure the help text for the standard options, for instance for i18n or because I like starting with a lower case letter or... Cheers Ben