Commander.js: Please add .command() function a path config

Created on 23 Dec 2015  路  5Comments  路  Source: tj/commander.js

It would be better if we can customize the path of sub-command file.

Most helpful comment

Our naming policy enforces camel case for filenames, but subcommands are more naturally written in kebab case. Currently commander doesn't do this mapping neither gives an option for me to do it manually. It would be great if there would be either

  • camelize option for subcommands or
  • a way to configure the executables` path.

All 5 comments

Our naming policy enforces camel case for filenames, but subcommands are more naturally written in kebab case. Currently commander doesn't do this mapping neither gives an option for me to do it manually. It would be great if there would be either

  • camelize option for subcommands or
  • a way to configure the executables` path.

Pull Request #854 adds an option for this.

I am interested in feedback on executableFile as the option name?

e.g.

.command("example", "example description", { executableFile: "myExampleCommand" });

Pull Request #999 is being considered for v3, adds option to override executable file name

This issue will be resolved when v3.0.0 is released. Available now as a prerelease. See #1001

.command now supports the executableFile option (thanks to @abetomo).
Shipped in v3: https://github.com/tj/commander.js/releases/tag/v3.0.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oknoorap picture oknoorap  路  4Comments

shadowspawn picture shadowspawn  路  3Comments

youurayy picture youurayy  路  5Comments

mtrabelsi picture mtrabelsi  路  3Comments

snitin315 picture snitin315  路  4Comments