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

alias doesn't work with git-style commands #419

Closed
thoughtless opened this issue Jul 3, 2015 · 7 comments
Closed

alias doesn't work with git-style commands #419

thoughtless opened this issue Jul 3, 2015 · 7 comments

Comments

@thoughtless
Copy link

Using alias with git-style commands like this doesn't work:

var program = require('commander');
program
  .version('0.0.1')
  .command('list', 'list some cool stuff')
  .alias('ls')
  .parse(process.argv);

Ideally I could just have pm and pm-list and the above would cause ./pm ls to invoke pm-list.

@justinhelmer
Copy link

This would be huge. These sub-commands are getting more and more popular.

+1

@datatypevoid
Copy link

+1

This would be a really nice addition.

@rstoenescu
Copy link

+1
Have been looking for this but found no solution. This would be a great addition.

@hedgerh
Copy link

hedgerh commented Sep 2, 2016

For anyone wondering,

This has apparently been fixed and merged into master, but not published to npm yet.

I'm pointing my dependency to the repo until the next release:

"commander": "git+https://github.com/tj/commander.js.git"

@mbilbille
Copy link

+1
Yes @hedgerh solution works, but it would be nice to ship this in a new release :)
Any update? Sad... this project is almost dead, no release since October 2015.

@luqimin
Copy link

luqimin commented Oct 21, 2017

any update?

@shadowspawn
Copy link
Collaborator

I was not able to reproduce this. (Hopefully fixed!)

Feel free to open a new issue if it comes up again, with new information and renewed interest.

Thank you for your contributions.

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

8 participants