Open mjpieters opened 3 weeks ago
This is blocked on rust-cli/anstyle#192 as I'm not going to move forward like uv did in astral-sh/uv#3979 due to all of the open question related to FORCE_COLOR
(see donatj/force-color.org#30). However, this shouldn't be blocking because CLICOLOR_FORCE
exists.
My PR interprets FORCE_COLOR
the same way CLICOLOR_FORCE
is interpreted: as non-empty.
Please support the
FORCE_COLOR
andNO_COLOR
environment variables as alternative to the--color
CLI switch.The start-up behaviour then would be:
--color
set: use this configuration.NO_COLOR
set: treat as--color never
FORCE_COLOR
set: treat as--color always
--color auto
.I see typos uses
anstyle
, likeuv
, so this is a virtual duplicate of astral-sh/uv#3955, withNO_COLOR
already working, andCLICOLOR_FORCE
having the same effect asFORCE_COLOR
.