Hmm, why not. Though most of the software do the right thing by checking if the standard output is an actual tty (isatty) to avoid colors when redirecting to something else (e.g. socket, fifo, etc). The name NO_COLOR suggests a really binary choice which may be okay. Though GNU coreutils usually have a more selective option like --color=always|auto|never. I'd prefer supporting a more general COLORS=on|off|compatible|…
No_color: Disabling ANSI color output by default
11–17 of 17 posts
Re: No_color: Disabling ANSI color output by default
#12Does NO_COLOR=1 mean that all ANSI formatting should be disabled? Including bold text, italic text, and so on? It seems that different software handles that question in different ways.
Re: No_color: Disabling ANSI color output by default
#13Hmm, why not. Though most of the software do the right thing by checking if the standard output is an actual tty (isatty) to avoid colors when redirecting to something else (e.g. socket, fifo, etc). The name NO_COLOR suggests a really binary choice which may be okay. Though GNU coreutils usually have a more selective option like --color=always|auto|never. I'd prefer supporting a more general COLORS=on|off|compatible|…
Yeah, my first thought on seeing this was that I really want a way to force color just as easily; when I output diffs in CI, they're much more readable with color but it's a pain to enable it when running headless.
At least I do. :)
Re: No_color: Disabling ANSI color output by default
#14had no effect yet
Re: No_color: Disabling ANSI color output by default
#15Re: No_color: Disabling ANSI color output by default
#16The terminal _really_ sucks for UI. I wish it was better