parser
parser copied to clipboard
arg and flag parser for oclif
This makes it compatible with TypeScript 4.8 Before this change, you get an error: ``` node_modules/@oclif/parser/lib/index.d.ts:16:52 - error TS2344: Type 'TFlags' does not satisfy the constraint 'OutputFlags'. 16 }>(argv: string[],...
fixes #162 Although this could be done differently by using the existing options, that seems like it might present a backwards compatibility issue so instead I added a new configuration...
Currently, if we have a flag that accepts multiple values followed by a boolean flag and then positional arguments, the multiple flag will erroneously receive the arguments that come after...
This feature aims to address the issue outlined in https://github.com/oclif/oclif/issues/190 to only allow a single value to be assigned for each flag that has the `multiple` option set. It's a...
See https://github.com/oclif/oclif/issues/301 Instead of doing `args as const` we can do `name: "name" as const` to ensure the name is kept; if that's omitted then you still get a map...
This enable the options test for flags provided through environment variables
This enables the multiple flag for an argument The advantage over #61 is that this allows "multiple" arguments right in the middle, although both proposals could co-exist aswell NOTE: Only...
When an arg is parsed that has the stopParsing flag set, the parser will stop trying to parse flags, and treat the rest of the input as arguments. One use...
The return type should not be a single item, but rather an array.
The example in the README was confusing since it starts with: ```ts const CLI = require('cli-args'); ``` Which I assume [is vestigial](https://github.com/heroku/cli-flags). Moving past that, trying to just C+P the...