From 63f443706c0121d92cbd5c73662e54bc1528f488 Mon Sep 17 00:00:00 2001 From: djk Date: Tue, 29 Jun 1999 00:03:13 +0000 Subject: [PATCH] added some heristics for console/xterms --- perl/Console.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/perl/Console.pm b/perl/Console.pm index 72c110ec..34c39131 100644 --- a/perl/Console.pm +++ b/perl/Console.pm @@ -23,8 +23,15 @@ package main; $maxkhist = 100; $maxshist = 500; -$foreground = COLOR_BLACK(); -$background = A_BOLD|COLOR_WHITE(); +if ($ENV{'TERM'} =~ /xterm/) { + $ENV{'TERM'} = 'color_xterm'; + $foreground = COLOR_BLACK(); + $background = A_BOLD|COLOR_WHITE(); +} +if ($ENV{'TERM'} =~ /(console|linux)/) { + $foreground = COLOR_WHITE(); + $background = COLOR_BLACK(); +} @colors = ( [ '^DX de [\-\w]+:\s+(14[45]\d\d\d|5[01]\d\d\d)', COLOR_PAIR(1) ], -- 2.43.0