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
path: root/doc
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-12-11 21:33:53 +0300
committerMyles Borins <mylesborins@google.com>2019-12-18 02:21:09 +0300
commit6a3e79f9536e192bef2aaafcbf5c73542173c405 (patch)
tree6cc632a72e0821b2d13fc3e28ec3d96808e4a665 /doc
parent1a8f828c171236476cad599fe7eeae27692113f9 (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')
-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 a8e89e4ef51..4703022d3b5 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.