Skip to content

Commit 18d6249

Browse files
Giovanni BucciRafaelGSS
authored andcommitted
repl: add support for multiline history
PR-URL: #57400 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jordan Harband <ljharb@gmail.com>
1 parent 14d751a commit 18d6249

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy