简体   繁体   English

Node REPL:如何突围...?

[英]Node REPL: how to break out of …?

So, in the node REPL, if I do something stupid, I get stuck in ... hell. 因此,在节点REPL中,如果我做一些愚蠢的事情,就会陷入...地狱。 I suppose the interpreter is waiting for the statement to be closed, but how can I break out of this? 我想解释器正在等待语句关闭,但是我该如何打破呢?

$ node
> "I did something stupid
...
...

I usually do Ctrl-C and that works fine atleast in Linux . 我通常使用Ctrl-C,并且在Linux中至少可以正常工作。

Ctrl-C and Escape are the most common "break from something" keys . Ctrl-C和Escape是最常见的“脱离事物”键。

It works in most of the terminal apps . 它适用于大多数终端应用程序。

As a bonus , in linux I use Ctrl-L to clear Node.js, Python etc REPL . 另外,在Linux中,我使用Ctrl-L清除Node.js,Python等REPL。

It is helpful sometimes . 有时会很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM