-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add command short description for global help #898
Comments
There is support for custom command help so you can expand on the short description like this: program
.command('test')
.description('summary description for global help')
.action(() => { })
.on("--help", () => {
console.log();
console.log("Description of the command can be very long");
console.log("and just displayed in the command help");
});
program.parse(process.argv); $ node . test --help
Usage: test [options]
summary description for global help
Options:
-h, --help output usage information
Description of the command can be very long
and just displayed in the command help |
Thanks for your answer. The description is still displayed on both the global help and on top of the command help. |
Opened a PR to add |
Hi,
Commands only have one description for now.
This description is used for both automatic global and command help.
Global help:
In a terminal the command description wraps to a second line.
This help purpose is only to have a quick overview not an acurate description.
Command help:
I think it might be useful to provide a short description for the global help. The current description would be only used in the command help to provide many details.
What do you think?
The text was updated successfully, but these errors were encountered: