Closed peazncheez closed 3 years ago
@75lb , mind reviewing / allowing the CI to run? And let me know if I shouldn't check in those dist
files if they're generated at a later stage or something.
morning, thanks for the new feature - sounds good to me.. I will review it later today.. Yes, the dist
should be checked in but don't worry about that - I'll take it from here as I might add some futher updates to freshen the library up..
hey @75lb , any updates? 🙂
Will you need the granularity of being able to set caseSensitive
at the option level or can we set the flag once when invoking the parse function?? E.g.
commandLineArgs(optionDefinitions, { caseInsensitive: true })
Also, the general convention is to enable an option flag by setting it to true
, not false
, so I will probably change the option name to caseInsensitive
..
Why are aliases always case-sensitive? Wouldn't it be more consistent to enable or disable case-sensitivity across the board?
Hey @75lb , thanks for the feedback. I had originally implemented the per-option case sensitivity granularity since that would be most flexible, but it's not necessary for my use case and I agree the additional complexity likely isn't worth it.
Pushed up some commits which:
caseInsensitive
as you recommendedAwesome, thank you!
Adds a caseSensitive field to OptionDefinition to support parsing certain arguments in a case insensitive manner. The default behavior continues to treat all command line arguments as case sensitive.
The UNIX-based command line is traditionally case sensitive, but the Windows command line is not. I'm working on a Windows application and we're currently using this library, but we'd like our args to be parsed in a case-insensitive manner.