-
-
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
Colouring fails in options #1651
Comments
First, the problem. Commander is using that first parameter to determine:
Commander uses some simple code to pull apart the parameter. Colouring the text is inserting a bunch of ascii escape sequences into the string, and that is not going to go well... I tried your first example to check, and although the short flag is displayed in cyan in the help, it does not work on command line.
|
The way to change the format of the help is to modify the Help class, either by a subclass or by overriding individual methods using See: https://github.com/tj/commander.js#more-configuration-2 For your case, the option flags are supplied by the
|
I am not sure I fully understand. In the following option .option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0) there are 5 parts or 4 arguments:
Please, clarify which method can format each part/argument. Tia |
The The
and displays it in the help as "term" and "description":
The The default implementation of
|
For interest, reopened: #301 |
The following works:
but not the next one:
It returns:
Tia
The text was updated successfully, but these errors were encountered: