arg icon indicating copy to clipboard operation
arg copied to clipboard

Short options get splited in permissive being true

Open GHolk opened this issue 2 years ago • 0 comments

As my realization, the {permissive: true} should left the unknown option being unparsed and treat them as positional arguments, but currently the permissive will still split the unknown short options. Is this a expected behavor? or can we change this behavor?

const arg = require('arg')
const args = arg({}, {argv: '-abc', permissive: true})
console.assert(args._[0] != '-abc')
console.assert(args._.join(' ') == '-a -b -c')

GHolk avatar Sep 02 '22 03:09 GHolk