Description
I'm trying to create a REPL via the programmatic library provided by the built-in repl package (https://nodejs.org/api/repl.html).
I'm doing something like this[1]:
var repl = require('repl')
repl.start(' > ')
And I'm expecting the commands I enter to be preserved if I open the repl once again later. Not finding that this is the case, I have been trying to setting both NODE_REPL_HISTORY
and NODE_REPL_HISTORY
by doing something like this process.env.NODE_REPL_HISTORY = 'somepath'
. I've tried setting something
to relative path, absolute path, a folder, a file, a non-existing file and a already existing file. But in all cases, the history is not persisted.
I'm not sure if I found a bug or if I'm doing something wrong but would appreciate any I can get.
- Version: v5.8.0 but reproduced the same issue on every version down to v4.0.0, haven't tested lower versions than that...
- Platform: Darwin Mak.localdomain 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64
- Subsystem: REPL
[1] In reality I'm doing something bigger, https://github.com/victorbjelkholm/trymodule, but figured a small test-case is better for troubleshooting.