-
-
Couldn't load subscription status.
- Fork 140
Open
Description
By convention, I am used to colorized applications suppressing colorization when sending the output to a pipe, unless I explicitly force colorization.
For example, in colors.js:
if (process.stdout && !process.stdout.isTTY) {
return false;
}Writing an app using colorize, I was surprised that colors were not suppressed when doing app > file.txt or app | cat. The color codes can cause problems in later processing stages.
I then turned colorization off for non-TTY output with:
String.disable_colorization(true) unless STDOUT.isattyI'd like to propose that be the default behavior, with a way to force colors by choice in all cases.
chocolateboy
Metadata
Metadata
Assignees
Labels
No labels