]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ls: --color: honor separate sequences for extension cases
authorPádraig Brady <P@draigBrady.com>
Sun, 4 Sep 2022 18:59:25 +0000 (19:59 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 13 Mar 2023 16:20:38 +0000 (16:20 +0000)
commit47988fad885e8129f9dc36f0ed4d63375de23603
tree1eb1b78b48bb2472081c56c7a3a35208889d2e26
parent1ac1d6def69e1faaefd1b41492764ef27c90b7a5
ls: --color: honor separate sequences for extension cases

Following on from commit v8.29-45-g24053fbd8 which unconditionally
used case insensitive extension matching, support selective
case sensitive matching when there are separate extension cases
defined with different display sequences.

* src/dircolors.hin: Document how file name suffixes are matched.
Note this is displayed with `dircolors --print-database` which
the texi info recommends to use for details.
* src/ls.c (parse_ls_color): Postprocess the list to
mark entries for case sensitive matching,
and also adjust so that unmatchable entries are more quickly ignored.
(get_color_indicator): Use exact matching rather than
case insensitive matching if so marked.
* tests/ls/color-ext.sh: Add test cases.
* NEWS: Mention the change in behavior.
Addresses https://bugs.gnu.org/33123
NEWS
src/dircolors.hin
src/ls.c
tests/ls/color-ext.sh