ndmitchell / cmdargs

Haskell library for command line argument processing
Other
91 stars 12 forks source link

the built-in help flag is hard to customise #22

Open simonmichael opened 9 years ago

simonmichael commented 9 years ago

I'd like to make -h a synonym for --help, and suppress -?. But "h" is automatically assigned to another flag (--hide-successes). If I add the "explicit" annotation to that one, cmdargs complains at runtime about a missing ? name. The example in helpArg's haddock (helpArg [explicit, name "h"]) complains about a repeated h name.

simonmichael commented 6 years ago

I just ran into the same issue in 2018. How actually do we make -h an alias for --help in cmdargs programs ?

cf https://hackage.haskell.org/package/cmdargs-0.10.19/docs/System-Console-CmdArgs-Implicit.html#v:helpArg