Skip to content

Commit c2cbe42

Browse files
Giovanni Bucciaduh95
Giovanni Bucci
authored andcommitted
repl: add support for multiline history
PR-URL: #57400 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Jordan Harband <[email protected]>
1 parent e2de48a commit c2cbe42

17 files changed

+739
-111
lines changed

doc/api/repl.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ The `replServer.displayPrompt()` method readies the REPL instance for input
625625
from the user, printing the configured `prompt` to a new line in the `output`
626626
and resuming the `input` to accept new input.
627627

628-
When multi-line input is being entered, an ellipsis is printed rather than the
628+
When multi-line input is being entered, a pipe `'|'` is printed rather than the
629629
'prompt'.
630630

631631
When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
@@ -680,6 +680,14 @@ A list of the names of some Node.js modules, e.g., `'http'`.
680680
<!-- YAML
681681
added: v0.1.91
682682
changes:
683+
- version: REPLACEME
684+
pr-url: https://github.com/nodejs/node/pull/57400
685+
description: The multi-line indicator is now "|" instead of "...".
686+
Added support for multi-line history.
687+
It is now possible to "fix" multi-line commands with syntax errors
688+
by visiting the history and editing the command.
689+
When visiting the multiline history from an old node version,
690+
the multiline structure is not preserved.
683691
- version:
684692
- v13.4.0
685693
- v12.17.0

0 commit comments

Comments
 (0)