]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ls(1): Add --color=when
authorKyle Evans <kevans@FreeBSD.org>
Fri, 17 Aug 2018 04:15:51 +0000 (04:15 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 17 Aug 2018 04:15:51 +0000 (04:15 +0000)
commite10ba80063386211b1c74eb72b4fb0f4093e93c0
treea4c99e1a78be1d46c6c006b98c22c18a8d3ec8af
parentb14959dacc796b287f2b8fc1da0bf975797ecf6f
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