13 lines
414 B
Perl
13 lines
414 B
Perl
#!perl
|
|
|
|
sub command :Tab(tail) ($self, $cart, $command, @) {
|
|
return NEXT if $command ne 'tail';
|
|
|
|
my $n = (`tput lines 2>/dev/null` || 13) - 3;
|
|
my $c = (`tput cols 2>/dev/null` || 80) + 0;
|
|
|
|
# ew :)
|
|
system "perl -lane's/CHECKOUT\\s+\\S+\\s+// or next; /\\s[-+][a-z]/i and next; s/ #// or next; s/_/ /; print' .revbank.log | tail -n$n | perl -ple'\$_ = substr \$_, 0, $c'";
|
|
|
|
return ACCEPT;
|
|
}
|