Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-12-11 21:33:53 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-12-15 18:26:35 +0300
commit21ecaa47eed39a4ede527e0b340d102ba8e1972b (patch)
tree7a9db34818cd5b98b4c36062a53b7d6bb469210e /doc/api/repl.md
parent6c542d1c26decd53fa1154a5aa7a53b4199cad1f (diff)
repl: add completion preview
This improves the already existing preview functionality by also checking for the input completion. In case there's only a single completion, it will automatically be visible to the user in grey. If colors are deactivated, it will be visible as comment. This also changes some keys by automatically accepting the preview by moving the cursor behind the current input end. PR-URL: https://github.com/nodejs/node/pull/30907 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc/api/repl.md')
-rw-r--r--doc/api/repl.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/api/repl.md b/doc/api/repl.md
index 21f5193c12c..c545be16cb8 100644
--- a/doc/api/repl.md
+++ b/doc/api/repl.md
@@ -565,8 +565,9 @@ changes:
* `breakEvalOnSigint` {boolean} Stop evaluating the current piece of code when
`SIGINT` is received, such as when `Ctrl+C` is pressed. This cannot be used
together with a custom `eval` function. **Default:** `false`.
- * `preview` {boolean} Defines if the repl prints output previews or not.
- **Default:** `true`. Always `false` in case `terminal` is falsy.
+ * `preview` {boolean} Defines if the repl prints autocomplete and output
+ previews or not. **Default:** `true`. If `terminal` is falsy, then there are
+ no previews and the value of `preview` has no effect.
* Returns: {repl.REPLServer}
The `repl.start()` method creates and starts a [`repl.REPLServer`][] instance.