Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positional arguments with aliased subcommand #128

Open
oskarrough opened this issue Jun 21, 2018 · 0 comments
Open

Positional arguments with aliased subcommand #128

oskarrough opened this issue Jun 21, 2018 · 0 comments

Comments

@oskarrough
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant