I use Emacs 24.2. I've installed js-comint
and js-mode
from MELPA, executed run-js
, and now in REPL instead of >
sign i have this gibberish:
^[[1G> ^[[0K^[[3G
The REPL itself in Inferior Javascript mode works just fine, just the >
sign is changed. If you enter unfinished expression, it even prints ^[[1G... ^[[0K^[[5G
. The ^[
are system characters, that are not copied with copy-paste, i add them for you to have an idea.
In my init-file:
(require 'js-comint)
(setq inferior-js-program-command "nodejs")
In terminal calling nodejs
produces working REPL.
Why prompt behaves this way? What should i do to correct this?
Not sure how recent, but now one can download and use the
nodejs-repl
.Just add one line in your .emacs:
Answer come from this post: Node.js prompt '>' can not show in eshell
\033
is the escape character it prints as^[
.