diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-12-11 21:33:53 +0300 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2019-12-18 02:21:09 +0300 |
commit | 6a3e79f9536e192bef2aaafcbf5c73542173c405 (patch) | |
tree | 6cc632a72e0821b2d13fc3e28ec3d96808e4a665 /doc | |
parent | 1a8f828c171236476cad599fe7eeae27692113f9 (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.md | 5 |
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. |