JLine has support for saving and restoring the history but it doesn't look like we use this in the dotty repl currently.