将 Node.js REPL 与高级行编辑器一起使用
【Using the Node.js REPL with advanced line-editors】
对于高级行编辑器,请使用环境变量 NODE_NO_READLINE=1 启动 Node.js。这将使主 REPL 和调试器 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"