Hi,
I would like to log whole my urxvt session like script(1) or screen(1)
does. But without escape sequences which script(1) and screen(1)
saved. I have one solution but I am not satisfied with it:
use File::Temp qw( tempfile );
my ( $fh, $filename );
sub on_init {
my ( $term ) = @_;
( $fh, $filename ) = tempfile();
warn "dump to ", $filename;
}
sub on_add_lines {
my ( $term, $string ) = @_;
print $fh $string;
$fh->flush();
()
}
sub on_destroy {
my ( $term ) = @_;
$fh->close();
warn $filename, " closed";
}
The problem of using on_add_lines() is that the hook is called every
time when a line is changed. Even if I edit command line (searching in
the BASH history, using BACKSPACE and so on). How can I do it better?
Jiri
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode