Parse: refactor flag name matching and duplicate detection behavior #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a significant overhaul of how Parse matches flags to command-line args, env vars, and config file keys. The primary motivation was fixing #145 -- now you can define
-v, --verboseand-V, --versionand they will work as (generally) expected.There are subtle changes in behavior that impact how environment variables, and .env config files, are parsed. Read the docs for details. The main change is that now, by default, only long names are used when matching flags to environment variables. This is technically a breaking change, but if this breaks your program, you were doing something wrong :)