SVN: toys/stbr/queue_parser.pl
sparky
sparky at pld-linux.org
Fri Oct 30 15:26:45 CET 2009
Author: sparky
Date: Fri Oct 30 15:26:44 2009
New Revision: 10888
Modified:
toys/stbr/queue_parser.pl
Log:
- use -t switch to enable terminal colors
Modified: toys/stbr/queue_parser.pl
==============================================================================
--- toys/stbr/queue_parser.pl (original)
+++ toys/stbr/queue_parser.pl Fri Oct 30 15:26:44 2009
@@ -11,6 +11,11 @@
my $data_dir = $ENV{PWD};
+my $term = 0;
+if ( $ARGV[0] eq "-t" ) {
+ $term = 1;
+ shift @ARGV;
+}
my $line = shift @ARGV;
$line ||= "th";
$line = ucfirst lc $line;
@@ -67,7 +72,7 @@
return "\033[" . $color_to_code_term{$color} . "m";
}
-*main::color = $ENV{TERM} ? \&color_term : \&color_irc;
+*main::color = $term ? \&color_term : \&color_irc;
sub get
{
More information about the pld-cvs-commit
mailing list