You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NO_COLOR environment variable is an informal standard which states:
All command-line software which outputs text with ANSI color added should check for the presence of a NO_COLOR environment variable that, when present (regardless of its value), prevents the addition of ANSI color.
How it should work:
If the --colour command-line option is explicitly specified, its value is used.
If the --colour option is not specified (or specified as AUTO), then:
a. Check if the NO_COLOR envvar is present. If it is, disable coloured output (NO).
b. Check if stdout is attached to a terminal (isatty()). If it is, enable coloured output (YES).
c. Otherwise, disable coloured output (NO).
The code, as it stands currently, performs steps 1, 2b and 2c, so this is a matter of adding the extra logic described in step 2a.
The text was updated successfully, but these errors were encountered:
The
NO_COLOR
environment variable is an informal standard which states:How it should work:
--colour
command-line option is explicitly specified, its value is used.--colour
option is not specified (or specified asAUTO
), then:a. Check if the
NO_COLOR
envvar is present. If it is, disable coloured output (NO
).b. Check if
stdout
is attached to a terminal (isatty()
). If it is, enable coloured output (YES
).c. Otherwise, disable coloured output (
NO
).The code, as it stands currently, performs steps 1, 2b and 2c, so this is a matter of adding the extra logic described in step 2a.
The text was updated successfully, but these errors were encountered: