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

[feature request] Command --help should show available subcommands #37

Open
jsumners opened this issue Feb 28, 2020 · 0 comments
Open

Comments

@jsumners
Copy link

prog
  .command('foo')
  .describe('Top level command')
  .action(() => console.log('see `app foo --help`'))

prog
  .command('foo bar')
  .describe('A subcommand')
  .action(() => console.log('did a thing'))

Use case: the foo command doesn't do anything and requires usage of subcommands. As it is, doing app foo --help does not display any possible subcommands under the "Usage" section. Instead, one has to do app --help to see a potentially long list of available commands and subcommands. Ideally, app --help would show the foo command but not the foo bar command so that one would have to do app foo --help to see the available subcommands.

Side request: foo could do something, but it'd just be an alias of a required subcommand.

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