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

Conveniency about parameter "argsDescription" in program.description() #1321

Closed
ltccss opened this issue Jul 31, 2020 · 2 comments
Closed

Conveniency about parameter "argsDescription" in program.description() #1321

ltccss opened this issue Jul 31, 2020 · 2 comments
Milestone

Comments

@ltccss
Copy link

ltccss commented Jul 31, 2020

In my case, some arguments of a command are not necessary to describe, but currently I have to write all descriptions of them to avoid the null reference error.

I think it may be more pleasant to make a null check for "argsDescription[arg.name]" here?

desc.push(' ' + pad(arg.name, width) + ' ' + wrap(argsDescription[arg.name], descriptionWidth, width + 4));

@shadowspawn
Copy link
Collaborator

Reasonable suggestion.

(This is the second ever issue opened for the undocumented argsDescription parameter to .description()!)

@shadowspawn shadowspawn self-assigned this Aug 1, 2020
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Aug 1, 2020
@shadowspawn shadowspawn removed their assignment Aug 1, 2020
@shadowspawn shadowspawn added this to the v6.1.0 milestone Aug 5, 2020
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Aug 28, 2020
@shadowspawn
Copy link
Collaborator

Released in Commander v6.1
https://github.com/tj/commander.js/releases/tag/v6.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants