将 Node.js REPL 与高级行编辑器一起使用


¥Using the Node.js REPL with advanced line-editors

对于高级行编辑器,使用环境变量 NODE_NO_READLINE=1 启动 Node.js。这将在规范的终端设置中启动主程序和调试器 REPL,这将允许与 rlwrap 一起使用。

¥For advanced line-editors, start Node.js with the environment variable NODE_NO_READLINE=1. This will start the main and debugger REPL in canonical terminal settings, which will allow use with rlwrap.

例如,可以将以下内容添加到 .bashrc 文件中:

¥For example, the following can be added to a .bashrc file:

alias node="env NODE_NO_READLINE=1 rlwrap node"