diff options
Diffstat (limited to 'src/libeinfo')
-rw-r--r-- | src/libeinfo/libeinfo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c index 98cec928..6f0ca766 100644 --- a/src/libeinfo/libeinfo.c +++ b/src/libeinfo/libeinfo.c @@ -150,11 +150,11 @@ static bool term_is_cons25 = false; static char termcapbuf[2048]; static char tcapbuf[512]; #else -/* No curses support, so we hardcode a list of colour capable terms */ +/* No curses support, so we hardcode a list of colour capable terms + * Only terminals without "color" in the name need to be explicitly listed */ static const char *const color_terms[] = { "Eterm", "ansi", - "color-xterm", "con132x25", "con132x30", "con132x43", @@ -174,7 +174,6 @@ static const char *const color_terms[] = { "kterm", "linux", "linux-c", - "mach-color", "mlterm", "putty", "rxvt", @@ -189,8 +188,6 @@ static const char *const color_terms[] = { "vt220", "wsvt25", "xterm", - "xterm-256color", - "xterm-color", "xterm-debian", NULL }; @@ -402,7 +399,10 @@ colour_terminal(FILE * EINFO_RESTRICT f) * which is not available to us when we boot */ if (term_is_cons25 || strcmp(term, "wsvt25") == 0) { #else - while (color_terms[i]) { + if (strstr(term, "color")) + in_colour = 1; + + while (color_terms[i] && in_colour != 1) { if (strcmp(color_terms[i], term) == 0) { in_colour = 1; } |