Skip to content

about commander -h and help command #1153

Closed
@DemonCloud

Description

@DemonCloud

First, the cli code as:

const cli = require('commander');
const plugin = require('./commandos/plugin');

cli.
  command('plugin [command] [pluginName]').
  description(DESCRIPTION.plugin).
  action(plugin);

cli.
  command('help').
  description(DESCRIPTION.help).
  action(()=>cli.help());

cli.parse(process.argv);

When I type the command as in terminal:

cli plugin help

it was not run the [plugin] function, I can not get [command] param, it just print help information in the terminal?
it is a bug, right?

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