[Bug 245270] ls(1) man page describes LSCOLORS wrong

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Apr 2 04:16:51 UTC 2020


            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 at FreeBSD.org
          Reporter: deepbluemistake at gmail.com
                CC: doc at FreeBSD.org

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

The ls man page
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 names
and behavior:
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 ls.1
currently seen in the GitHub repository (presumably -current)

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

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 provides
the same output.  The colors struct in ls's print.c has bold-status, foreground
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

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

More information about the freebsd-doc mailing list