I am using Scala JLine in my CLI program. It works great, but it forgets my story every time I restart my program. I see a class called FileHistory , and I see that the ConsoleReader class has a method called setHistory() that accepts an instance of FileHistory . I would expect a call to this method to make it create or load and save a file containing my history. But this is not so.
Unfortunately, the documentation is almost absent. How can I do this, since the next time I run my program with JLine support, it remembers the commands that I typed in the previous run?
Update
The correct answer given below is Miranda. Thanks mirandes and som-snytt for both their useful (yes solvents) answers.
source share