]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ls: allow --classify to be ignored for non tty output
authorJason Kim <git@jasonk.me>
Sun, 19 Apr 2020 08:40:16 +0000 (01:40 -0700)
committerPádraig Brady <P@draigBrady.com>
Mon, 27 Apr 2020 12:48:32 +0000 (13:48 +0100)
commit9c8a385aa4c342a2b1af5f5a0604afb249a1cf66
tree1b85c732bb1d0758bfaea0adfe01b9636f9f21e2
parentf38bd362d9a2c97f11188b20258447d0540c995d
ls: allow --classify to be ignored for non tty output

Have the `ls` `--classify` option take an optional argument for when to
classify ("always", "auto", "never"), just like the optional argument
for `--color`.  When the optional argument is not specified, default to
"always" for backwards compatibility.

* src/ls.c (usage): Update help text.
(decode_switches): Support an optional argument for --classify.
* tests/ls/classify.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the new feature.
NEWS
doc/coreutils.texi
src/ls.c
tests/local.mk
tests/ls/classify.sh [new file with mode: 0755]