command-line-args
command-line-args copied to clipboard
A mature, feature-complete library to parse command-line options.
It would be very useful if one was able to configure command-line-args so that a Boolean option can take it's value as an argument, just like a String option. Currently...
As in https://github.com/75lb/command-line-args/issues/112, I was surprised to find that parsing a flag with a type when the argument is omitted does not error, instead returning `null`. That issue points to...
The [wiki](https://github.com/75lb/command-line-args/wiki/Terminate-parsing-with-a-double-hypen#solution-use-stopatfirstunknown-with---) discusses how to correctly handle a double hyphen / double dash (`--`), but the suggested solution doesn't work when `defaultOption` is set, particularly alongside `multiple`: ```js 'use strict';...
Support positional args, similar to what is [available in argparse](https://docs.python.org/3/howto/argparse.html#introducing-positional-arguments).
I know it's really an edge case since it can only happen when not reading the awesome documentation properly. But since it's actually a contradiction according to the documentation and...
I'm running v5.1.1 in an Electron app. I have the following code ``` const optionDefinitions = [ { name: 'debug', type: Boolean }, { name: 'divafsDisable', type: Boolean }, {...
When parsing an `argv` value of `-1` (minus one), if an option definition with an `alias` value of of `'1'` exists then parse `-1` as that option. If the option...
Currently, you must include a space between short option and value, i.e. ``` $ example -i Filename.sh ``` To be more like [getopt](https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html#Using-Getopt), make the space between option and value...