From owner-svn-src-all@freebsd.org Thu May 21 03:50:57 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 14E0F2FF8A7; Thu, 21 May 2020 03:50:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49SFym6sbPz4H17; Thu, 21 May 2020 03:50:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6DC9270B1; Thu, 21 May 2020 03:50:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04L3ouJX031526; Thu, 21 May 2020 03:50:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04L3ouOR031524; Thu, 21 May 2020 03:50:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202005210350.04L3ouOR031524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 21 May 2020 03:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361318 - head/bin/ls X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/bin/ls X-SVN-Commit-Revision: 361318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 03:50:57 -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. 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 */