Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2020 18:40:36 +0100
From:      James Wright <james.wright@digital-chaos.com>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: ls colour (COLORTERM / CLICOLOR)
Message-ID:  <39ad4771-2c87-6e9c-b683-697a88b41ac9@digital-chaos.com>
In-Reply-To: <CACNAnaG9Wd1teVFG6O0cOsL21VK7YJ-U1O4mHf6MSoWaX1Yh2A@mail.gmail.com>
References:  <557add91-44cf-c981-8965-9bab90498ea1@digital-chaos.com> <CACNAnaG9Wd1teVFG6O0cOsL21VK7YJ-U1O4mHf6MSoWaX1Yh2A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 20/07/2020 14:26, Kyle Evans wrote:
> On Sat, Jul 18, 2020 at 7:51 PM James Wright
> <james.wright@digital-chaos.com> wrote:
>>
>>      Updated to 12.1-STABLE r363215 a few days ago (previous build was
>> circa 1st June)
>> but seem to have lost "ls" colour output with "COLORTERM=yes" set in my env.
>>
>>     Setting "CLICOLOR=yes" seems to enable it again, however the man page
>> states that
>> setting either should work?
>>
> Hi,
>
> Indeed, sorry for the flip-flopping. The short version of the
> situation is that I had flipped ls(1) to --color=auto by default based
> on a misunderstanding of defaults elsewhere due to shell aliases that
> I hadn't realized were in use. The ls(1) binary is historically and
> almost universally configured for non-colored by default where color
> support exists, and you should instead use appropriate shell alias for
> ls=`ls -G` or `ls --color=auto`.
>
> I can see where the manpage could describe the differences a little
> better. CLICOLOR (On FreeBSD) historically meant that we'll enable
> color if the terminal supports it, and setting it would have the same
> effect as the above shell alias. COLORTERM is less aggressive and
> won't imply any specific --color option, you would still --color=auto
> to go with it for it to have any effect.
>
> Thanks,
>
> Kyle Evans

Thank you for the clarifying the diferences between CLICOLOR and COLORTERM,
that makes sense to me now. I'll set the shell alias and remove COLORTERM.
Only raised this in case it was an unintended consequence of recent 
changes. :-)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39ad4771-2c87-6e9c-b683-697a88b41ac9>