jline / jline3

JLine is a Java library for handling console input.
Other
1.46k stars 215 forks source link

Substitute for PersistentHistory #262

Closed mghildiy closed 6 years ago

mghildiy commented 6 years ago

Hi,

I have replaced jline 2 with jline 3, and PersistentHistory seems to be no more available now. So what class can be used as its substitute?

gnodet commented 6 years ago

The DefaultHistory is the default implementation used and is persistent by default. in order to turn on persistence, you need to define the following variable:

reader.setVariable(LineReader.HISTORY_FILE, myPersistenceFile);