HomeFreeBSD

ls: prevent no-color build from complaining when COLORTERM is non-empty

Description

ls: prevent no-color build from complaining when COLORTERM is non-empty

As 257886 reports, if ls(1) is built with WITHOUT_LS_COLORS="YES", it
issues a warning whenever COLORTERM is non-empty. The warning is not
useful, so I thought to remove it, but as Ed pointed out, we may want
to have a way to determine whether a particular copy of ls has been
compiled with color support or not.

Therefore move the warnx() call to the getopt loop in
a WITHOUT_LS_COLORS build to fire when the user asks for colored output.

PR: 257886
Reported by: Marko Turk
Reviewed by: kevans

Details

Provenance
pstefAuthored on Aug 18 2021, 8:47 PM
Parents
rGd59c5e023d55: crunch: drop WARNS override
Branches
Unknown
Tags
Unknown