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 committed 2015-10-19 12:59:09 +01:00
1 parent 31b3db53da
commit 069961924e
1 file changed
+1 -1
+1 -1
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;