mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/6397 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexander Makarenko <estliberitas@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
committed by
James M Snell
parent
a45ab97ab6
commit
563c9f8687
@@ -301,7 +301,9 @@ the following values:
|
||||
Defaults to checking `isTTY` on the `output` stream upon instantiation.
|
||||
|
||||
- `historySize` - maximum number of history lines retained. To disable the
|
||||
history set this value to `0`. Defaults to `30`.
|
||||
history set this value to `0`. Defaults to `30`. This option makes sense
|
||||
only if `terminal` is set to `true` by the user or by an internal `output`
|
||||
check, otherwise the history caching mechanism is not initialized at all.
|
||||
|
||||
The `completer` function is given the current line entered by the user, and
|
||||
is supposed to return an Array with 2 entries:
|
||||
|
||||
Reference in New Issue
Block a user