1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 18:26:32 +02:00

ls: detect terminal color support using glob patterns

* src/ls.c (know_term_type): Corresponding to commit v8.24-48-gc249a5a,
use fnmatch to inspect the dircolors database.  Noticed due to
failing tests/ls/color-{dtype-dir,term}.sh tests.
This commit is contained in:
Pádraig Brady
2015-10-19 12:48:49 +01:00
parent 31b3db53da
commit 069961924e

View File

@@ -2341,7 +2341,7 @@ known_term_type (void)
{
if (STRNCMP_LIT (line, "TERM ") == 0)
{
if (STREQ (term, line + 5))
if (fnmatch (line + 5, term, 0) == 0)
return true;
}
line += strlen (line) + 1;