Open
Description
A single environment variable is much easier to use. You don't need to worry about other conflicting environment variables being set already. Just update the one variable to your desired value, and poof.
I would suggest the following:
COLOR=false/no/0
means don't output color codes.COLOR=true/yes/1
means output color codes.COLOR=auto
means output color codes only if output is going to a terminal.COLOR=
(empty) means the same as not set, no explicit choice was made. Applications should be encouraged to fall back toCLICOLOR
,CLICOLOR_FORCE
andNO_COLOR
. But they could also just default toCOLOR=auto
.
Unrecognized values are treated the same as an unset environment variable (they are ignored).
Its more complicated to support all the different truthy/falsy values, but I believe it would match user expectations quite well. For maximum niceness for users, the comparison should probably be case insensitive too.
For backwards compatibility, the specification should indicate to ignore CLICOLOR
, NO_COLOR
and CLICOLOR_FORCE
if COLOR
variable is set and not empty.
Metadata
Metadata
Assignees
Labels
No labels