Closed wg closed 5 months ago
Ouch. It tries to parse items sequentially, first a
, then b
, a
is missing so it gives up right away with both --b
and -
marked as "unparsed". Then it tries to come up with a good error message and gets it all wrong. I'm surprised it never came up before.
I see two possible fixes - one is to be a bit more lazy at failing and try to parse b
, the other one is to try to be a bit more careful when wording errors. --b
is a valid flag and it knows it.
Thank you for a good test case, I'll see what I can do about it tomorrow.
Okay, I have a fix and fixing that improved some other error messages. I'll try to make a new release this weekend.
Looks good here, bpaf is a real joy to use, thank you for it and for the quick release!
Hi @pacak, thanks again for bpaf! I'm migrating some projects at work to it and ran into an incorrect error message which I've reduced to this case:
When run with arguments
--b 1
bpaf outputsno such flag: `--b`, did you mean `--a`?