Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Apr 2020 04:16:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 245270] ls(1) man page describes LSCOLORS wrong
Message-ID:  <bug-245270-9@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245270

            Bug ID: 245270
           Summary: ls(1) man page describes LSCOLORS wrong
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Manual Pages
          Assignee: bugs@FreeBSD.org
          Reporter: deepbluemistake@gmail.com
                CC: doc@FreeBSD.org

Created attachment 212969
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D212969&action=
=3Dedit
diff to ls.1

The ls man page
https://www.freebsd.org/cgi/man.cgi?query=3Dls&apropos=3D0&sektion=3D0&manp=
ath=3DFreeBSD+12.1-RELEASE+and+Ports&arch=3Ddefault&format=3Dhtml
https://github.com/freebsd/freebsd/blob/master/bin/ls/ls.1
describes the colors wrong.  I checked ls's code, and indeed it can and does
use ANSI color, so the actual ANSI standard can be referenced for color nam=
es
and behavior:
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
Especially since the man page also references ANSI in the LSCOLORS section.
Discovered this on 12.1-RELEASE-p3 but wrote and attached a patch for the l=
s.1
currently seen in the GitHub repository (presumably -current)

Important to note is that some terminals do not have separate colors for bo=
ld
and non-bold text.  Some terminals do have separate colors, of course, but =
not
all.

Semi-relatedly, and not dealt with in this patch or bug report:
LSCOLORS's format is deficient, anyway.  Setting it to bC, Bc, or BC provid=
es
the same output.  The colors struct in ls's print.c has bold-status, foregr=
ound
color, and background color as three different items.  The LSCOLORS string
should have them as three different characters too, rather than conflating
boldness with one of the colors.  Hence I think bc should be 0bc and Bc, bC,
and BC should be 1bc

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245270-9>