From owner-svn-src-all@freebsd.org Thu May 21 12:59:46 2020 Return-Path: Delivered-To: svn-src-all@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 947FF2CF006; Thu, 21 May 2020 12:59:46 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 49SV816b3Jz3SBJ; Thu, 21 May 2020 12:59:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 04LCxhph016513; Thu, 21 May 2020 05:59:43 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 04LCxh0C016512; Thu, 21 May 2020 05:59:43 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202005211259.04LCxh0C016512@gndrsh.dnsmgr.net> Subject: Re: svn commit: r361318 - head/bin/ls In-Reply-To: <202005210350.04L3ouOR031524@repo.freebsd.org> To: Kyle Evans Date: Thu, 21 May 2020 05:59:43 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@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-Rspamd-Queue-Id: 49SV816b3Jz3SBJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2020 12:59:46 -0000 > Author: kevans > Date: Thu May 21 03:50:56 2020 > New Revision: 361318 > URL: https://svnweb.freebsd.org/changeset/base/361318 > > Log: > ls: fix a --color regression from r337956 > > The regression is in-fact that I flipped the default from never to auto. The > incorrect impression was based on an alias that I failed to notice, > installed by the Linux distribution that I used for testing compatibility > here. Users that want the old default should be doing so with a shell alias > as is done elsewhere, rather than making this decision in ls(1). > > Many thanks to rgrimes for pointing out the alias that I clearly overlooked > that resulted in this; if you despised colors in your terminal from this, > consider buying him a beer at the next venue that you see him at. Thanks Kyle, but this is likely to get me more rocks than beers :-) > > MFC after: 1 week > Relnotes: yes > > Modified: > head/bin/ls/ls.1 > head/bin/ls/ls.c > > Modified: head/bin/ls/ls.1 > ============================================================================== > --- head/bin/ls/ls.1 Thu May 21 03:33:20 2020 (r361317) > +++ head/bin/ls/ls.1 Thu May 21 03:50:56 2020 (r361318) > @@ -32,7 +32,7 @@ > .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 > .\" $FreeBSD$ > .\" > -.Dd August 18, 2018 > +.Dd May 20, 2020 > .Dt LS 1 > .Os > .Sh NAME > @@ -216,8 +216,8 @@ Output colored escape sequences based on > .Ar when , > which may be set to either > .Cm always , > -.Cm auto > -(default), or > +.Cm auto , > +or > .Cm never . > .Pp > .Cm always > @@ -252,6 +252,12 @@ environment variable is set and not empty. > .Pp > .Cm never > will disable color regardless of environment variables. > +.Cm never > +is the default when neither > +.Fl -color > +nor > +.Fl G > +is specified. > .Pp > For compatibility with GNU coreutils, > .Nm > > Modified: head/bin/ls/ls.c > ============================================================================== > --- head/bin/ls/ls.c Thu May 21 03:33:20 2020 (r361317) > +++ head/bin/ls/ls.c Thu May 21 03:50:56 2020 (r361318) > @@ -152,7 +152,7 @@ static int f_timesort; /* sort by time vice name */ > int f_type; /* add type character for non-regular files */ > static int f_whiteout; /* show whiteout entries */ > #ifdef COLORLS > - int colorflag = COLORFLAG_AUTO; /* passed in colorflag */ > + int colorflag = COLORFLAG_NEVER; /* passed in colorflag */ > int f_color; /* add type in color for non-regular files */ > bool explicitansi; /* Explicit ANSI sequences, no termcap(5) */ > char *ansi_bgcol; /* ANSI sequence to set background colour */ > -- Rod Grimes rgrimes@freebsd.org