Skip to content

Commit

Permalink
repl: improve doc for disabling REPL history on Windows
Browse files Browse the repository at this point in the history
Environment variables with empty values are not permitted on Windows. As
such, to disable persistent REPL history one or more spaces should be
used. Node will trim whitespace from the variable, resulting in a blank
variable at runtime and the desired behaviour.

PR-URL: #25672
Fixes: #25661
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
  • Loading branch information
ralish authored and MylesBorins committed May 16, 2019
1 parent bb96d79 commit 2f1ad8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,10 @@ environment variables:

- `NODE_REPL_HISTORY` - When a valid path is given, persistent REPL history
will be saved to the specified file rather than `.node_repl_history` in the
user's home directory. Setting this value to `''` will disable persistent
REPL history. Whitespace will be trimmed from the value.
user's home directory. Setting this value to `''` (an empty string) will
disable persistent REPL history. Whitespace will be trimmed from the value.
On Windows platforms environment variables with empty values are invalid so
set this variable to one or more spaces to disable persistent REPL history.
- `NODE_REPL_HISTORY_SIZE` - Controls how many lines of history will be
persisted if history is available. Must be a positive number.
**Default:** `1000`.
Expand Down

0 comments on commit 2f1ad8e

Please sign in to comment.