From owner-svn-src-stable@freebsd.org Wed Aug 15 02:11:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2F4106E608; Wed, 15 Aug 2018 02:11:42 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85FA072C35; Wed, 15 Aug 2018 02:11:41 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w7F1ftmV045151; Tue, 14 Aug 2018 18:41:55 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w7F1ft69045150; Tue, 14 Aug 2018 18:41:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808150141.w7F1ft69045150@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r337826 - stable/11/bin/ls In-Reply-To: <201808150129.w7F1T23r064553@repo.freebsd.org> To: Kyle Evans Date: Tue, 14 Aug 2018 18:41:55 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 02:11:42 -0000 > Author: kevans > Date: Wed Aug 15 01:29:02 2018 > New Revision: 337826 > URL: https://svnweb.freebsd.org/changeset/base/337826 > > Log: > MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment > > COLORTERM is the de facto standard, while CLICOLOR is generally specific to > FreeBSD and ls(1). I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?" Seems that the defaults for xfce terminal is to have COLORTERM. > PR: 230101 > > Modified: > stable/11/bin/ls/ls.1 > stable/11/bin/ls/ls.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/bin/ls/ls.1 > ============================================================================== > --- stable/11/bin/ls/ls.1 Wed Aug 15 01:24:43 2018 (r337825) > +++ stable/11/bin/ls/ls.1 Wed Aug 15 01:29:02 2018 (r337826) > @@ -32,7 +32,7 @@ > .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 > .\" $FreeBSD$ > .\" > -.Dd December 1, 2015 > +.Dd August 8, 2018 > .Dt LS 1 > .Os > .Sh NAME > @@ -140,6 +140,8 @@ after each that is a > Enable colorized output. > This option is equivalent to defining > .Ev CLICOLOR > +or > +.Ev COLORTERM > in the environment. > (See below.) > This functionality can be compiled out by removing the definition of > @@ -636,6 +638,10 @@ The > variable still needs to reference a color capable terminal however > otherwise it is not possible to determine which color sequences to > use. > +.It Ev COLORTERM > +See description for > +.Ev CLICOLOR > +above. > .It Ev COLUMNS > If this variable contains a string representing a > decimal integer, it is used as the > @@ -660,7 +666,9 @@ for more information. > .It Ev LSCOLORS > The value of this variable describes what color to use for which > attribute when colors are enabled with > -.Ev CLICOLOR . > +.Ev CLICOLOR > +or > +.Ev COLORTERM . > This string is a concatenation of pairs of the format > .Ar f Ns Ar b , > where > @@ -767,6 +775,8 @@ option for more details. > .It Ev TERM > The > .Ev CLICOLOR > +and > +.Ev COLORTERM > functionality depends on a terminal type with color capabilities. > .It Ev TZ > The timezone to use when displaying dates. > > Modified: stable/11/bin/ls/ls.c > ============================================================================== > --- stable/11/bin/ls/ls.c Wed Aug 15 01:24:43 2018 (r337825) > +++ stable/11/bin/ls/ls.c Wed Aug 15 01:29:02 2018 (r337826) > @@ -374,7 +374,7 @@ main(int argc, char *argv[]) > f_listdot = 1; > > /* Enabling of colours is conditional on the environment. */ > - if (getenv("CLICOLOR") && > + if ((getenv("CLICOLOR") || getenv("COLORTERM")) && > (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) > #ifdef COLORLS > if (tgetent(termcapbuf, getenv("TERM")) == 1) { > > -- Rod Grimes rgrimes@freebsd.org