-
Notifications
You must be signed in to change notification settings - Fork 944
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
supports-color breaks coloring #683
Comments
|
Sorry for the late reply, here are some screenshots. Here I'm using debug v4.1.1 installed with What I found strange is that the +NNNms has the correct color, while the namespace didn't, I narrowed it down to that line I pointed to in my initial comment. Below I'm using my fork as the version installed with |
Could you do me a favor and change this line: To this: -const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+const colorCode = '\\e[3' + (c < 8 ? c : '8;5;' + c); Re-run and post the results here? |
Those look fine, they should be working. This is a bug in CMD.exe. I'll open a ticket with Microsoft later. |
You are in fact correct, I tested it on a mac and it works just fine |
Bold has always been quite broken on Windows. Here's an open issue that probably has to do with this bug. For posterity, here's a bug where bold-off ( So, it's an ongoing process. cc @zadjii-msft is this a new problem that I should file, or is this the same as microsoft/terminal#109? |
So, microsoft/terminal#109 is mostly just tracking the rendering of bolded text, which is still somewhere down the backlog and unsupported. However, the bug here is that combining 256-color values ( |
Wonderful, thanks for the quick response as always @zadjii-msft :) I'm going to close this as fixed. Thanks for the report @NaNraptor, good find. |
@qix, what if I make a PR that removes boldness based on environment variable? I'm working in a corporate environment and very likely that windows updates that will bring this feature will take a while :(. And it will depend on each of my coworkers to update their machine 😢. Thanks |
@webuniverseio I wouldn't approve that, unfortunately. I don't want to introduce more environment variables when we're working to remove them. You can, however, do |
@Qix- Thank you so much for your response. Unfortunately I'm trying to archive the opposite - get different colors with I have a different proposal - what if everything will be in normal font when color is used? Even on windows 1809 I don't see bold text & even if was bold, not sure how much value would it add. I guess it can be useful when there is no color & perhaps it really helps to visually separate logs on other OS... Please let me know what you think. Thank you! |
This line over here defines an ANSI extended color set for bright color which doesn't display correctly: (by incorrectly I mean it's just bold white color)
https://github.com/visionmedia/debug/blob/5c7c61dc0df0db4eb5de25707d8cd1b9be1add4f/src/node.js#L169
It shouldn't(?) have a traling
;1
after${colorCode}
. So the line should like:const prefix = ` ${colorCode}m${name} \u001B[0m`;
This fixes the bug (for me :) )
EDIT: This supports my observation 256 colors
Also from the article:
and the
;1
option only applies to\u001b[44
ie background colors, while the\u001b[38
option for foreground colors does not have such thingThe text was updated successfully, but these errors were encountered: