ndmitchell / cmdargs

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

Add command aliases #28

Open ndmitchell opened 9 years ago

ndmitchell commented 9 years ago

From http://code.google.com/p/ndmitchell/issues/detail?id=444:

Often programs need command line aliases, for example in HLint --utf8 == --encoding=UTF8, and for Hoogle --all == --count=1000000. These should be supported properly, for example, I could add:

alias "--encoding=UTF8" &= name "utf" etc.

Should these be specified at the bottom of the flags? How do I control where the flags appear in the help list? Should you be allowed alias "--opt-foo --opt-bar" "-O1" ? There's something scope for something there.