From 2f1ad8efbd9a26aad1d0e152c5c73f312edb1c8a Mon Sep 17 00:00:00 2001 From: "Samuel D. Leslie" Date: Thu, 24 Jan 2019 09:45:02 +1100 Subject: [PATCH] repl: improve doc for disabling REPL history on Windows 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: https://github.com/nodejs/node/pull/25672 Fixes: https://github.com/nodejs/node/issues/25661 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Vse Mozhet Byt Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Anto Aravinth Reviewed-By: Bartosz Sosnowski --- doc/api/repl.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/repl.md b/doc/api/repl.md index 09fe9ebcbece61..60adbf641d1592 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -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`.