coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: dircolors, add alacritty


From: Pádraig Brady
Subject: Re: Patch: dircolors, add alacritty
Date: Wed, 13 Oct 2021 14:18:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 12/10/2021 23:20, Horea Christian wrote:
Dear coreutils,

Alacritty is a terminal that has been around for a while and supports 
colorization.
Of course, there are ways to hack this, but I think DIR_COLORS needs to be 
aware of this.

Right dircolors will set empty LS_COLORS due to not matching the TERM.
In that case ls will resort to using its default basic color set
(which it does because COLORTERM is set).

Adding various terminals to the default list seems not a general solution 
though.
I think we might handle this more generally by dircolors supporting
the COLORTERM env var which most terminals set, including alacritty.

As you say one can workaround this per user
on Fedora at least with:
printf '%s\n' TERM=alacritty 'INCLUDE /etc/DIR_COLORS.256color' >> ~/.dir_colors

BTW dircolors(1) should probably also have a mode to print LS_COLORS like:

  $ eval $(TERM=xterm dircolors)
  $ echo $LS_COLORS | tr : '\n' | sed 's/\(.*\)=\(.*\)/\x1b[\2m\1\t\2\x1b[0m/'

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]