]> git.ipfire.org Git - thirdparty/coreutils.git/commit
dircolors: consider COLORTERM as well as TERM env vars
authorPádraig Brady <P@draigBrady.com>
Sat, 12 Feb 2022 21:54:07 +0000 (22:54 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 15 Feb 2022 17:01:19 +0000 (17:01 +0000)
commit75c9fc6740e93dba95f63a1e5e92bd5cf17f1743
tree5695d5edf3e1296ebda8311b07c99fb9e2975931
parent0b0f1965fba57f1c75d92e36ac3cbc0d58396810
dircolors: consider COLORTERM as well as TERM env vars

COLORTERM is an environment used usually to expose truecolor support in
terminal emulators.  Therefore support matches on that in addition
to TERM.  Also set the default COLORTERM match pattern so that
we apply colors if COLORTERM is any value.

This implicitly supports a terminal like "foot"
without a need for an explicit TERM entry.

* NEWS: Mention the new feature.
* src/dircolors.c (main): Match COLORTERM like we do for TERM.
* src/dircolors.hin: Add default config to match any COLORTERM.
* tests/misc/dircolors.pl: Add test cases.
NEWS
src/dircolors.c
src/dircolors.hin
tests/misc/dircolors.pl