Hello. I had done some investigation already, after having trouble using rlwrap from within Emacs' vterm mode. Copying from here the relevant parts.
Minimum steps to reproduce
Install/compile rlwrap 0.45 or later.
Install ed editor
Launch vterm in emacs
Type rlwrap ed
Type Ctrl-e
Expected: move cursor to the end of the line
Actual: character '^E' appears
Explanation
The check added in this commit is good for shell and eshell mode, where the TERM is "dumb" and line editing is already handled by Emacs, but for the terminal modes, vterm and term, where there is no interference of Emacs with the line input, rlwrap just doesn't work.
I believe we should differentiate between the two cases, "dumb" TERM or not, in order to make rlwrap work inside vterm and term.
Hello. I had done some investigation already, after having trouble using rlwrap from within Emacs' vterm mode. Copying from here the relevant parts.
Minimum steps to reproduce
rlwrap ed
Expected: move cursor to the end of the line Actual: character '^E' appears
Explanation
The check added in this commit is good for shell and eshell mode, where the TERM is "dumb" and line editing is already handled by Emacs, but for the terminal modes, vterm and term, where there is no interference of Emacs with the line input, rlwrap just doesn't work. I believe we should differentiate between the two cases, "dumb" TERM or not, in order to make rlwrap work inside vterm and term.