How to get rlwrap to work inside Emacs' shell / eshell?

828 Views Asked by At

When I try to get rlwrap to work inside an Emacs (version 24.3.50.1) shell buffer (either M-x shell or M-x eshell), I get this error message:

rlwrap: Oops, crashed (caught SIGFPE) - this should not have happened!

For example:

 rlwrap telnet google.com 80

wors fine from a regular terminal (like xterm), but crashes from a shell inside an Emacs buffer.

Several people are having similar issue but the only "answer" I could find so far is a "RTFM" style answer on mailing lists. I did read that part of Emacs' doc and I don't understand what I'm supposed to do to make rlwrap work from within Emacs.

1

There are 1 best solutions below

0
On BEST ANSWER

Try using M-xansi-term instead of shell/eshell.

shell and eshell do not provide terminal emulation functionality, but readline requires terminal emulation capabilities to move the cursor etc.