From owner-freebsd-stable@freebsd.org Mon Jul 20 17:40:37 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AB2A364ECA for ; Mon, 20 Jul 2020 17:40:37 +0000 (UTC) (envelope-from james.wright@digital-chaos.com) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9TXN4f9xz4Ltv; Mon, 20 Jul 2020 17:40:35 +0000 (UTC) (envelope-from james.wright@digital-chaos.com) Received: from [192.168.0.15] ([82.18.193.38]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.179]) with ESMTPSA (Nemesis) id 1M27ep-1jzVaS36jZ-002XuN; Mon, 20 Jul 2020 19:40:33 +0200 Subject: Re: ls colour (COLORTERM / CLICOLOR) To: Kyle Evans Cc: FreeBSD-STABLE Mailing List References: <557add91-44cf-c981-8965-9bab90498ea1@digital-chaos.com> From: James Wright Message-ID: <39ad4771-2c87-6e9c-b683-697a88b41ac9@digital-chaos.com> Date: Mon, 20 Jul 2020 18:40:36 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Provags-ID: V03:K1:hQ9Zb8VatZN8eP7ePa2gKc35v/XJdtRsmRdI65yPolTOyqJvKo2 dkkpwm9s7hvwVhk2Qk3VwnYiMbXnrpteI/pXZy6ItbX/lQ5HXFYv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92igsqGF JxC2ZM1w853J+kE3xzqw== X-Rspamd-Queue-Id: 4B9TXN4f9xz4Ltv X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; REPLY(-4.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 17:40:37 -0000 On 20/07/2020 14:26, Kyle Evans wrote: > On Sat, Jul 18, 2020 at 7:51 PM James Wright > 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. :-)