arcanis / clipanion

Type-safe CLI library / framework with no runtime dependencies
https://mael.dev/clipanion/
1.11k stars 64 forks source link

Inconsistent behavior for options with uppercase values #141

Open jeffsee55 opened 1 year ago

jeffsee55 commented 1 year ago

This options regex disallows --someUppercase=my-value but allows --someUppercase my-value and allows -someUppercase=my-value. I was able to get what i wanted by changing it to:

const OPTION_REGEX = /^(--[a-zA-Z]+(?:-[a-zA-Z]+)*|-[a-zA-Z]+)$/;

Happy to submit a PR if this was an oversight, but curious to know why it's like this if it was intentional.