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

2

5

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.

Multifoliate answered 30/9, 2014 at 1:49 Comment(1)
Why the downvote? By googling I can see that several people are having this issue. Downvoter, do you know what rlwrap is? Do you know what I'm doing wrong? By the way this is Emacs, where every "configuration" is done programatically, so I don't see why this would be offtopic (most Emacs questions here are about "configuration"... Which are often answered by some elisp code).Multifoliate
D
7

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.

Dressage answered 30/9, 2014 at 15:38 Comment(0)
T
0

Actually you should use ansi-term or vterm with:

env -u INSIDE_EMACS rlwrap
Tympanites answered 16/6 at 22:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.