Closed shadowspawn closed 2 years ago
(This PR builds on #68 so the diff is currently noisy. To see the new code in the meantime look for isShortAndValue.)
isShortAndValue
Add support for combining an option and its value in the same argument. For example these are the same using the tail command:
tail
tail -n 3 index.js tail -n3 index.js
Or with parseArgs:
parseArgs
parseArgs(['-n', '3'], { withValue: ['n'] }); parseArgs(['-n3'], { withValue: ['n'] });
NB: this is the classic pattern with value directly following short and not the same pattern included in #62 which used -n=3. Which might prompt some discussion...
-n=3
Working on redo of this with new configuration bag of options.
Redid work in #75 after #63 landed.
(This PR builds on #68 so the diff is currently noisy. To see the new code in the meantime look for
isShortAndValue
.)Add support for combining an option and its value in the same argument. For example these are the same using the
tail
command:Or with
parseArgs
:NB: this is the classic pattern with value directly following short and not the same pattern included in #62 which used
-n=3
. Which might prompt some discussion...