I'm a node.js beginner. I want to modify the behavior of node's default REPL, as decribed in this link, but I don't want to run a startup script because doing so starts the REPL without importing the existing history file. (I know this because I tried the code from the first answer: the modified REPL started, but prior history wasn't available.)
Is this possible? Or would it be easier to figure out how to add/import the existing history file and add said code to a startup script?
NOTE: I also tried using rlwrap with -H path/to/.node_repl.history, as suggested in this thread, combined with the script from the first link, and still no luck. I get the modified behavior, but no history.