replServer.displayPrompt([preserveCursor])
preserveCursor<boolean>
replServer.displayPrompt() 方法准备 REPL 实例以供用户输入,将配置的 prompt 打印到 output 中的新行并恢复 input 以接受新输入。
¥The replServer.displayPrompt() method readies the REPL instance for input
from the user, printing the configured prompt to a new line in the output
and resuming the input to accept new input.
输入多行输入时,会打印省略号而不是 'prompt'。
¥When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'.
当 preserveCursor 为 true 时,光标位置不会重置为 0。
¥When preserveCursor is true, the cursor placement will not be reset to 0.
replServer.displayPrompt 方法主要用于从操作函数内部调用使用 replServer.defineCommand() 方法注册的命令。
¥The replServer.displayPrompt method is primarily intended to be called from
within the action function for commands registered using the
replServer.defineCommand() method.