From owner-svn-src-head@freebsd.org Fri Aug 17 16:31:06 2018 Return-Path: Delivered-To: svn-src-head@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 1B7521074AD9; Fri, 17 Aug 2018 16:31:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C29F288C68; Fri, 17 Aug 2018 16:31:05 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 5FF2B27F00; Fri, 17 Aug 2018 16:31:05 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f45.google.com with SMTP id v22-v6so6293303lfe.8; Fri, 17 Aug 2018 09:31:05 -0700 (PDT) X-Gm-Message-State: AOUpUlG7VzALOflOVK57RhHdYO72vYGzS4yjsYIMekfrqpUjeNMFmBGq HK+fhcB8ih/7piLXbu1m6bwr1eHXa5lnphTzPfw= X-Google-Smtp-Source: AA+uWPwABCARoEZEQgvoeGB8ev0Ja65U/HLCLing6/qNeg5229pmiGIp0E7/ShRQHEG9Hv3ZMHF5c17Af+ZDDIzyhdc= X-Received: by 2002:a19:53d6:: with SMTP id h83-v6mr7672553lfl.15.1534523463778; Fri, 17 Aug 2018 09:31:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Fri, 17 Aug 2018 09:30:42 -0700 (PDT) In-Reply-To: <201808171549.w7HFndsp059932@pdx.rh.CN85.dnsmgr.net> References: <201808171549.w7HFndsp059932@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 17 Aug 2018 11:30:42 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337956 - in head: . bin/ls To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 16:31:06 -0000 On Fri, Aug 17, 2018 at 10:49 AM, Rodney W. Grimes wrote: >> On Fri, Aug 17, 2018 at 10:26 AM, Kyle Evans wrote: >> > On Fri, Aug 17, 2018 at 10:24 AM, Rodney W. Grimes >> > wrote: >> >> [ Charset UTF-8 unsupported, converting... ] >> >>> Author: kevans >> >>> Date: Fri Aug 17 04:15:51 2018 >> >>> New Revision: 337956 >> >>> URL: https://svnweb.freebsd.org/changeset/base/337956 >> >>> >> >>> Log: >> >>> ls(1): Add --color=3Dwhen >> >>> >> >>> --color may be set to one of: 'auto', 'always', and 'never'. >> >>> >> >>> 'auto' is the default behavior- output colors only if -G or COLORT= ERM are >> >> >> >> Why different than coreutils ls? Default for coreutils is none. >> > >> > I guess this was worded poorly and you skipped both the review and >> > reading the diff... this is still contingent on environment variables >> > or -G being specified. >> > >> >>> set, and only if stdout is a tty. >> >>> >> >>> 'always' is a new behavior- output colors always. termcap(5) will = be >> >>> consulted unless TERM is unset or not a recognized terminal, in wh= ich case >> >>> ls(1) will fall back to explicitly outputting ANSI escape sequence= s. >> >>> >> >>> 'never' to turn off any environment variable and -G usage. >> >> Why different than core utils? Coreutils uses none. >> > >> > I guess this was worded poorly and you skipped both the review and >> > reading the diff... this is still contingent on environment variables >> > or -G being specified. >> > >> >> ... copy-paste-o. The version of coreutils ls(1) that I have uses >> 'never' for this. There is no valid 'none' value. > > Oh boy, we need to investiage that then, cause it seems > as if the official page says none. Does your say it > has a different default value too? > For the record, the man page available on all of the Debian systems we have claim to be "GNU coreutils 8.28" from October 2017 and includes this verbiage: [start] ... --color[=3DWHEN] colorize the output; WHEN can be 'always' (default if omitted), 'auto', or 'never'; more info below ... Using color to distinguish file types is disabled both by default and with --color=3Dnever. With --color=3Dauto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the set=E2=80=90 tings. Use the dircolors command to set it. ... [end] To join this thread back into one... I think the problem is that I've worded things terrible, so you misunderstand. The default value is --color=3Dauto *if you've requested colors* (-G/environment), and --color=3Dnever otherwise. Doing otherwise is, IMO, a POLA violation in itself, because FreeBSD turns on colors with environment variables and has for 18 years now.