Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 277
Cedric Martin Avatar asked Mar 18 '23 08:03

Cedric Martin


1 Answers

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.

like image 175
ale Avatar answered Mar 23 '23 14:03

ale