Is there a way to have node preserve command line history between sessions?
问题 When I run node from the command line with no arguments, I enter an interactive shell. If I execute some commands, exit node, and restart node, the up arrow doesn't do anything (I'd like it scroll through my previous commands). Is there a way I can invoke node interactively such that it will remember my old commands? 回答1: You could use rlwrap to store node.js REPL commands in a history file. First, install rlwrap (done easily with a package manager like apt-get or brew etc). Then add an alias