I'm using Scala JLine in my CLI program. It's working fine, but it forgets my history every time I restart my program. I see a class called FileHistory
, and I see the ConsoleReader
class has a method called setHistory()
which takes an instance of FileHistory
. I would expect calling that method would cause it to create or load and save a file containing my history. But it doesn't.
Unfortunately the documentation is nigh nonexistent. How can I make it so the next time I run my JLine-enabled program it remembers the commands that I had typed in the previous run?
Update
Correct answer given below by mirandes. Thanks to mirandes and som-snytt both for their helpful (yea solvent) responses.