HomeFreeBSD

ls(1): Add --color=when

Description

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

Details

Provenance
kevansAuthored on
Reviewer
cem
Differential Revision
D16741: ls(1): Add --color=when
Parents
rS337955: MFC r335173, r335195
Branches
Unknown
Tags
Unknown