args icon indicating copy to clipboard operation
args copied to clipboard

Positional arguments with aliased subcommand

Open oskarrough opened this issue 7 years ago • 0 comments

If you use an alias for a subcommand, it takes up the first argument. Take this example:

// cli.js
args.command(['update', 'x'])

// cli-update.js
console.log(args.sub)

cli update x
// --> ['x']

cli up x
// --> ['up', 'x']

Is this intended? Or should the subcommand somehow be ignored. It makes it harder to rely on positional arguments.

oskarrough avatar Jun 21 '18 23:06 oskarrough