[m-dev.] MERCURY_ENABLE_COLOR

Peter Wang novalazy at gmail.com
Fri Jun 14 20:30:05 AEST 2024


On Fri, 14 Jun 2024 18:09:50 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> On 2024-06-14 18:00 +10:00 AEST, "Peter Wang" <novalazy at gmail.com> wrote:
> > 
> > How about: MERCURY_ENABLE_COLOR=1|0|always|never
> 
> I will implement that, but I intend to document only always/never. You can then
> add the documentation of 0/1 if you like; I expect I will find the text explaining
> the motivation behind that to be interesting.

Nothing that interesting. The variable name suggests a boolean value,
but AFAIK there isn't any consensus for what values to accept for a
boolean-valued env var. I feel like the candidates are 0/1 and true/false,
with yes/no and on/off being less likely possibilities. If I need to set
an env var to enable something, even if the value could be any non-empty
string, I think I'd most likely reach for 1. I guess other people would,
too. It's the shortest after all.

> With this capability, there is no need for MERCURY_COLOR_SCHEME=none
> or MERCURY_COLOR_SCHEME="" having the effect of turning off color.
> Since documenting/understanding what MERCURY_COLOR_SCHEME does
> is much simpler without it, intend to eliminate that special case. Does anyone
> object?

No objection from me.

Peter


More information about the developers mailing list