Skip to content

Built-in help subcommand does not work with aliased git-style commands #948

@MattTheNub

Description

@MattTheNub

Example

#!/usr/bin/env node

const program = require('commander');

program
  .version('0.0.1')
  .description('Fake package manager')
  .command('install [name]', 'install one or more packages').alias('i');

program.parse(process.argv);

When running the built-in help command on the alias (pm help i), this happens:

Expected Behavior

The alias gets resolved to install, and the information is read from pm-install

Actual Behavior

The command attempts to read pm-i and fails, as it does not exist.

Metadata

Metadata

Assignees

Labels

bugCommander is not working as intended

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions