[m-rev.] for review: options to control the use of color

Peter Wang novalazy at gmail.com
Tue May 7 17:34:12 AEST 2024


On Tue, 07 May 2024 16:46:54 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> On 2024-05-07 16:25 +10:00 AEST, "Peter Wang" <novalazy at gmail.com> wrote:
> > Also, some or all of these could be equivalent to disabling color
> > (unless overridden by another option):
> > 
> >     --color-scheme=none
> >     MERCURY_COLOR_SCHEME=""
> >     MERCURY_COLOR_SCHEME=none
> 
> "none" I definitely agree. I am not sure about MERCURY_COLOR_SCHEME="".
> While any shell scripts I write use sh/bash, my interactive shell has been tcsh
> for about three decades now. I know how to unset an env var in tcsh:
> just "unsetenv varname". I don't know how to do that sh/bash. Does an
> assignment of the empty string to a sh or bash var, followed by an export
> of the var unset the environment variable, or does it just set it to the empty string?
> And if the latter, how *do* you unset an envvar in sh/bash?

Assigning the empty string to a sh/bash variable sets the variable to
the empty string.

"export VAR" marks the variable to be exported to the environment
in child processes.

"unset VAR" removes the variable, which also unexports it.

You can try playing around with:

    sh -c 'FOO=; export FOO; unset FOO; FOO=bar; env|grep FOO'

> >> Another question: what exactly do light and dark mean in these names?
> >> Does "light" mean "light colors for dark backgrounds" or "dark colors
> >> for light backgrounds"? Should the names be changed to disambiguate this?
> >> lightbg and darkbg, perhaps?
> > 
> > I don't think that's necessary. CSS, mobile devices, and many applications
> > all have a "dark mode" or "dark themes", which refer to a light-on-dark
> > color scheme.
> > https://en.wikipedia.org/wiki/Light-on-dark_color_scheme
> 
> I agree that "dark mode" is clear on this point. I don't think "dark16" is.
> That said, I wouldn't object to including "mode" in the name of the scheme.

Meh, I still prefer "dark16" as a name. It's not important.

Peter


More information about the reviews mailing list