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
This commit is contained in:
parent
fb28c52075
commit
6ca17c6850
12
bin/ls/ls.1
12
bin/ls/ls.1
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user