-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Console.CmdArgs.Explicit.helpText: required arguments are rendered as optional and vice versa #15
Comments
OK, certainly a bug - I've got the boolean test the wrong way round - I figure out if it's required, then only put Unfortunately, I have a few places where I explicitly put PS. The reason |
Hmm, this one actually turns out to be a little tricky to solve without breaking anything else... CmdArgs Explicit can deal with a list of required arguments, followed by an optional argument that is repeated. CmdArgs Implicit can deal with much the same format, but it groups all the arguments into one argument, calls it implicit, says it is repeating, and then fakes the command structure information to get it working. Once Explicit puts on the |
CHANGES: 0.10.13 #24, support Ratio in some places ndmitchell/cmdargs#24 0.10.12 GHC 7.2 compatibility 0.10.11 #15, never put [brackets] around optional args in Explicit ndmitchell/cmdargs#15
The help text rendering (System.Console.CmdArgs.Explicit.helpText) renders required arguments as optional (with square brackets) and optional arguments as required (without square brackets).
Example
Expected output:
Main REQ [OPT]
Actual output:
Main [REQ] OPT
PS
The function
flagArg
creates optional arguments. I would prefer, if it created required arguments.Nevertheless,
CmdArgs
is really awesome!The text was updated successfully, but these errors were encountered: