cmdargs icon indicating copy to clipboard operation
cmdargs copied to clipboard

the built-in help flag is hard to customise

Open simonmichael opened this issue 10 years ago • 1 comments

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 avatar Mar 16 '15 05:03 simonmichael

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

simonmichael avatar Jan 13 '18 13:01 simonmichael