Closed alexchandel closed 8 years ago
That [-]
in the usage pattern is intended to be matched with command "-"
. The square brackets mark it as an optional command, but aren't a part of the command name itself.
I think the argument "baz"
issue is the same as in #15. The docs should also be clearer on how the [-]
and [--]
conventions are handled.
Thanks for submitting these issues! @alexchandel
@ryanartecona np, docopt is my preferred arg parsing API, it'd be nice to use it in Haskell.
When I have a usage of the form:
I would expect EITHER
isPresent args (argument "baz")
ORisPresent args (command "[-]")
(orisPresent args (argument "[-]")
or however you're supposed to refer to it) to be true. Not both.Yet
docopt.hs
consistently findargument "baz"
even when none exists, if[-]
is passed.Also, the README and documentation are extremely vague on how the stdin argument
[-]
should be checked for.