Skip to content

Commit

Permalink
Add not on short property that can container a long
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn committed Jan 12, 2025
1 parent 446accf commit 378db48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Option {
this.variadic = /\w\.\.\.[>\]]$/.test(flags); // The option can take multiple values.
this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.
const optionFlags = splitOptionFlags(flags);
this.short = optionFlags.shortFlag;
this.short = optionFlags.shortFlag; // May be a short flag, undefined, or even a long flag (if option has two long flags).
this.long = optionFlags.longFlag;
this.negate = false;
if (this.long) {
Expand Down

0 comments on commit 378db48

Please sign in to comment.