Node.js prompt '>' can not show in eshell

2020-02-29 00:45发布

I want to run Node.js in eshell, but the prompt does not right:

enter image description here

So, how can I fix this?

2条回答
疯言疯语
2楼-- · 2020-02-29 01:22

Try running node in eshell with NODE_NO_READLINE enabled. For example, you could add an alias to eshell by running this command in eshell:

alias node 'NODE_NO_READLINE=1 node'
查看更多
Luminary・发光体
3楼-- · 2020-02-29 01:25

An alternative is to add this to your .emacs:

(setenv "NODE_NO_READLINE" "1")

The benefit of this approach is that it will also work for other invocations of Node programs that you run directly.

查看更多
登录 后发表回答