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 support for Git-style sub-commands #402

Closed
wayneashleyberry opened this issue May 11, 2015 · 9 comments
Closed

Alias support for Git-style sub-commands #402

wayneashleyberry opened this issue May 11, 2015 · 9 comments
Labels
bug Commander is not working as intended

Comments

@wayneashleyberry
Copy link

Aliases don't seem to work at all when using subcommands...

@SomeKittens
Copy link
Collaborator

Can you provide an example?

@wayneashleyberry
Copy link
Author

// example.js

#!/usr/bin/env node

var app = require('commander')

app
  .version('1.0.0')
  .command('foo', '...').alias('f')
  .command('bar', '...').alias('b')
  .command('baz', '...').alias('bz')
  .parse(process.argv)
// example-foo.js

#!/usr/bin/env node

console.log('hello foo')
$ ./example.js foo // hello foo
$ ./example.js f // nothing...

@SomeKittens SomeKittens added the bug Commander is not working as intended label May 11, 2015
@leesei
Copy link

leesei commented Feb 2, 2016

It should be "Alias support for Git-style sub-commands".

@SpencerCDixon
Copy link

Any plans on adding this/would authors be open to a PR?

@wayneashleyberry wayneashleyberry changed the title Alias support for subcommands Alias support for Git-style sub-commands Feb 19, 2016
@zhiyelee
Copy link
Collaborator

PR is welcome!

@jontonsoup
Copy link

Did we determine if this is a bug or lack of feature? The label says bug, but the docs are unclear.

@hedgerh
Copy link

hedgerh commented Sep 2, 2016

For anyone wondering, a fix for this has been merged into master, but the fix has not been published to npm.

In the meantime, I'm pointing my dependency to the repo:

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

@philostler
Copy link

+1 for releasing with this fix

@rt2zz
Copy link

rt2zz commented Dec 16, 2016

@SomeKittens any chance we can get a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Commander is not working as intended
Projects
None yet
Development

No branches or pull requests

9 participants