]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ls(1): Add --color=when
authorkevans <kevans@FreeBSD.org>
Fri, 17 Aug 2018 04:15:51 +0000 (04:15 +0000)
committerkevans <kevans@FreeBSD.org>
Fri, 17 Aug 2018 04:15:51 +0000 (04:15 +0000)
commite9d18a079586938d8b796f4bdf1335f2bcc299dd
treea4c99e1a78be1d46c6c006b98c22c18a8d3ec8af
parent34e8e0f32d86aa8c2385d305ecf7975426c813fd
ls(1): Add --color=when

--color may be set to one of: 'auto', 'always', and 'never'.

'auto' is the default behavior- output colors only if -G or COLORTERM are
set, and only if stdout is a tty.

'always' is a new behavior- output colors always. termcap(5) will be
consulted unless TERM is unset or not a recognized terminal, in which case
ls(1) will fall back to explicitly outputting ANSI escape sequences.

'never' to turn off any environment variable and -G usage.

Reviewed by: cem, 0mp (both modulo last-minute manpage changes
Differential Revision: https://reviews.freebsd.org/D16741
UPDATING
bin/ls/extern.h
bin/ls/ls.1
bin/ls/ls.c
bin/ls/print.c
bin/ls/util.c