Open
Description
While filing up #18, I found a small inconsistency in the way ambiguities are resolved.
According to docopt.org:
Note, writing --input ARG (opposed to --input=ARG) is ambiguous, meaning it is not possible to tell whether ARG is option's argument or positional argument. In usage patterns this will be interpreted as option with argument only if option's description (covered below) for that option is provided. Otherwise it will be interpreted as separate option and positional argument.
So, if you take the following
Usage:
test --input ARG
and call it with --input foo
you'd expect:
fromList [(LongOption "input",Present),(Argument "ARG",Value "foo")]
but you get
fromList [(LongOption "input",Value "foo")]
Even providing the correct option description doesn't get the intended behavior:
Usage:
test --input ARG
Options:
--input
$ test --input foo
fromList [(LongOption "input",Value "foo")]
Disambiguating it the other way gives you something even stranger:
Usage:
test --input ARG
Options:
--input ARG
$ test --input foo
fromList [(LongOption "input",Value "foo"),(Argument "ARG",NoValue)]
Metadata
Metadata
Assignees
Labels
No labels
Activity