projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c4fd7e
)
added some heristics for console/xterms
author
djk
<djk>
Tue, 29 Jun 1999 00:03:13 +0000
(
00:03
+0000)
committer
djk
<djk>
Tue, 29 Jun 1999 00:03:13 +0000
(
00:03
+0000)
perl/Console.pm
patch
|
blob
|
history
diff --git
a/perl/Console.pm
b/perl/Console.pm
index 72c110ec2ce2c40da0ee92b973d66592194414d2..34c3913149e5e407c678223bd84f6319ba274c4b 100644
(file)
--- a/
perl/Console.pm
+++ b/
perl/Console.pm
@@
-23,8
+23,15
@@
package main;
$maxkhist = 100;
$maxshist = 500;
$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) ],
@colors = (
[ '^DX de [\-\w]+:\s+(14[45]\d\d\d|5[01]\d\d\d)', COLOR_PAIR(1) ],