-
-
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
Decouple arguments description from command description #1192
Comments
I think no special reason. That code matches the way they are specified, where the description is an expected parameter and the
(The |
I see, but the current implementation makes it impossible to avoid adding command description, when you only want to describe arguments. For example, when you have a self explanatory command, but want to provide some additional description for the arguments. My proposal is to change that, so this._argsDescription will be displayed regardless of the this._description. Optionally the description() method could also be adjusted, so if the first argument (str) is an object then it would swap the arguments (so you don't need to explicitly make str null or ''. |
Given the arguments descriptions are not currently documented, I don't this this issue will affect many people. No further activity in a month. Closing.
PR for this is welcome if someone does want to fix it.
No, I do not want to complicate the method signature for a rare case. Thank you for your contributions. |
In Commander 7, you can pass an empty string for the command description and supply an arguments description to add just arguments description. |
commander.js/index.js
Lines 1398 to 1416 in 516a14c
Hello.
Is there a special reason why we cannot only describe command arguments without the command itself?
The text was updated successfully, but these errors were encountered: