nodejs / repl

REPL rewrite for Node.js ✨🐢🚀✨
MIT License
177 stars 25 forks source link

Save to REPL history before running input #38

Closed cactysman closed 5 years ago

cactysman commented 5 years ago

I'm currently working with big files and try to manipulate them with a few JS lines here and there and sometimes the REPL crashes because it's running out of memory - which is fine, that's just the way it is.

But what I noticed here is that it's not saving the executed line to the history unless it's still alive after (so I pretty much lose the line that caused the termination).

I would like to propose a change so that it first appends to history (and saves the file?) and then executes the input.

cactysman commented 5 years ago

Oh wow, I didn't realize at all that this is a rewrite / different version of the REPL. Please excuse me 😪