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

Ability to customize subcommand help output #55

Open
1 of 3 tasks
shaunwarman opened this issue Nov 22, 2019 · 1 comment
Open
1 of 3 tasks

Ability to customize subcommand help output #55

shaunwarman opened this issue Nov 22, 2019 · 1 comment

Comments

@shaunwarman
Copy link

shaunwarman commented Nov 22, 2019

Issue Type

  • Bug Report
  • Feature Request
  • Other

Expected

$ command subcommand --help

Subcommand is used to... <---- this would be nice to be able to add

Usage:
  $ command subcommand

Options:
  -v, --version  Display version number
  -h, --help     Display this message

Actual

$ command subcommand --help

Usage:
  $ command subcommand

Options:
  -v, --version  Display version number
  -h, --help     Display this message

Possible Solutions

Add per command options to customize output to user.

cli.command('subcommand', 'description here')
    .help(`
          ${this.description}
          ${chalk.yellow(...)}
          ...
     `)

Info

  • CAC version: 6.5.1
@shaunwarman
Copy link
Author

shaunwarman commented Nov 22, 2019

I'm guessing the way to do this is in the help callback just parse that it's not the default or global command and then have a switch / map to customize each subcommand output?

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

1 participant