Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13e6608

Browse filesBrowse files
vsemozhetbytFishrock123
authored andcommitted
doc: extra clarification of historySize option
History caching in the `readline` io is active only for terminal interaction. Appropriate variables are initialized and relevant `_addHistory()` function is called only if exposed `terminal` option of `readline.createInterface()` is set `true` by user or internal output check. This clarification is useful to assure users there will be now wasted overhead connected with history caching if `readline` is used not for terminal interaction (e.g. for reading files line by line). Particularly this fix is helpful after #6352 landing. PR-URL: #6397 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexander Makarenko <estliberitas@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 3d5b732 commit 13e6608
Copy full SHA for 13e6608

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/readline.md‎

Copy file name to clipboardExpand all lines: doc/api/readline.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ the following values:
301301
Defaults to checking `isTTY` on the `output` stream upon instantiation.
302302

303303
- `historySize` - maximum number of history lines retained. To disable the
304-
history set this value to `0`. Defaults to `30`.
304+
history set this value to `0`. Defaults to `30`. This option makes sense
305+
only if `terminal` is set to `true` by the user or by an internal `output`
306+
check, otherwise the history caching mechanism is not initialized at all.
305307

306308
The `completer` function is given the current line entered by the user, and
307309
is supposed to return an Array with 2 entries:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.