-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
#1256 added a support for lone short flag.
Unfortunately, this only works correctly on short flags with one character. Short flags with multiple characters (Java-style short flags) will incorrectly create incorrect field names. For example, .option('-name') will result in a field Name, which is not in camelCase.
The reason is that this regex only matches a short flag with one character. This means a short flag with multiple characters will be categorized as a long flag. Consequently, Commander.js attempts to strip -- from -name, which is a no-op, resulting in -name. Then, the camel case conversion of -name results in Name, which is not a camel case as intended.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels