freebsd-dev/bin/ls
Piotr Pawel Stefaniak ced2dcadcc 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
2021-08-19 21:22:16 +02:00
..
tests Fix ls_tests:o_flag with ZFS TMPDIR 2016-12-15 16:13:52 +00:00
cmp.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
extern.h ls(1): Add --color=when 2018-08-17 04:15:51 +00:00
ls.1 ls(1): Use \& as an escape character for the ',' option 2020-10-10 13:39:13 +00:00
ls.c ls: prevent no-color build from complaining when COLORTERM is non-empty 2021-08-19 21:22:16 +02:00
ls.h Convert ls(1) to not use libxo(3) 2018-01-17 22:47:34 +00:00
Makefile Now that we have MK_LS_COLORS, we don't need RELEASE_CRUNCH check here. 2019-07-15 07:35:46 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
print.c ls(1): Add --color=when 2018-08-17 04:15:51 +00:00
util.c ls(1): Add --color=when 2018-08-17 04:15:51 +00:00