Open cowboy opened 11 years ago
FWIW, I think the new default behaviour is better; an unknown option should be assumed to be a flag (edit: unless they are in the form -a=b
of course). But if major-version back compat is desired (which would be very surprising), then yes, this is a bug.
I'm just happy to know either way what the intention is, and to see some documentation around how unexpected arguments are handled.
Yes, this is an intentional change, and the reason for bumping the version to 2.x from 1.x.
Docs would be lovely. First one to send a pull request with docs gets the honor of closing this issue :)
I've noticed a behavior change from nopt@1.0.10 -> nopt@2.1.2 with the parsing of unexpected arguments.
--
) were equivalent.--
) behave differently. Basically,-a a
works like-a
(setting propa
totrue
) but adds"a"
the theremain
array. Shouldn't both set propa
to string"a"
?