psh (Perl Shell) and the Emacs shell-mode
That I love both Emacs and Perl is a matter of public record.
One of the thing that's great about so-called agile languages (like Perl) is that they lend themselves to interactive shells. If you've played with Ruby on Rails you have probably come across the excellent irb. Well psh is one (of many) such shell for Perl.
Trouble is it insists on extensively using gnu readline (if installed). This is great for regular terminals but is a royal pain if you try to use it within a shell-mode buffer in emacs.
To get rid of all those escape characters without hacking the code, add the following to your .pshrc:
require "$ENV{HOME}/.pshrc_emacs" if $ENV{EMACS} eq 't';
and that .pshrc_emacs should look like:{
package Psh::OS;
sub setup_readline_handler {}
sub remove_readline_handler {}
sub reinstall_resize_handler {}
sub check_terminal_size {}
}
1;
02:26 AM, 03 Nov 2006 by Mark Aufflick Permalink






