]> git.ipfire.org Git - thirdparty/coreutils.git/commit
dircolors: add --print-ls-colors to display colored entries
authorPádraig Brady <P@draigBrady.com>
Sun, 13 Feb 2022 18:19:04 +0000 (18:19 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 13 Feb 2022 18:25:59 +0000 (18:25 +0000)
commitabc4533fe4b7eba1c92263f49145713ff5fc0c3c
tree9e08ce78f45c0fafa69dde87b9af92819d730134
parent26db930c81701953d2850289bd6a835362ff8cd0
dircolors: add --print-ls-colors to display colored entries

* NEWS: Mention the new feature.
* doc/coreutils.texi (dircolors invocation): Describe the new
--print-ls-colors option.
* src/dircolors.c (print_ls_colors): A new global to select
between shell or terminal output.
(append_entry): A new function refactored from dc_parse_stream()
to append the entry in the appropriate format.
(dc_parse_stream): Adjust to call append_entry().
* tests/misc/dircolors.pl: Add test cases.
NEWS
doc/coreutils.texi
src/dircolors.c
tests/misc/dircolors.pl