[Haskell-cafe] Re: Re: A question regarding cmdargs package

Ben Franksen ben.franksen at online.de
Tue Oct 12 18:59:22 EDT 2010


Joachim Breitner wrote:
> Am Dienstag, den 12.10.2010, 16:42 +1100 schrieb Ivan Lazar Miljenovic:
>> On 12 October 2010 16:32, Magnus Therning <magnus at therning.org> 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?
>> 
>> When you don't want to bother defining the help options/descriptions? :p
> 
> note that people expect "cmd --help" to at least do nothing. So if your
> program is called "launchMissiles", please make it at least spit out a
> message like "your evil dictator was too lazy to write a help message"
> when it is called with --help.
> 
> (That is if you are sharing your program. Not sure if you should share
> "launchMissiles" at all.)

launchMissiles = putStrLn "Boom! (just kidding :)"

BTW another cool feature of an auto-magic option parsing lib is the GNU
standard "--" (arguments after this are not to be treated as options).

Cheers
Ben



More information about the Haskell-Cafe mailing list