args
args copied to clipboard
Positional arguments with aliased subcommand
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.