Closed aaronccasanova closed 2 years ago
Converted to draft until we get some consensus in #11
@aaronccasanova bother you for a rebase?
@aaronccasanova landed @shadowspawn's refactor this morning, so I think this and @bakkot's potential refactor around positionals are the last two blockers for MVP.
In Commander, the error messages refer to the option with both the short and long form and the argument if applicable, rather than just what was used on the command line. So in same style as the usage might appear in the help. If the user used the short form, the long form is more informative about the option purpose.
% fab clone --branch
error: option '-b, --branch <branchname>' argument missing
% fab --silly
error: unknown option '--silly'
Thanks for the reviews and feedback! I'm happy for this PR to be merged as is and willing to help with any quick follow ups. My last PR was merged by @shadowspawn and I'm not entirely sure if I should be merging into main. That being said, I don't want to block anyone, so feel free to merge and/or push up any updates!
Taking a last look now. Thanks for all the hard work @aaronccasanova
This PR introduces a
strict
mode parser config that is enabled by default.Errors on:
type:'string'
used like a boolean option e.g. lone--string
type:'boolean'
used like a string option e.g.--boolean=foo
Examples: