}
}
private static MemoryHistory getHistory()
{
MemoryHistory history;
File historyFile = new File(getUserHome(), ".presto_history");
try {
history = new FileHistory(historyFile);
}
catch (IOException e) {
System.err.printf("WARNING: Failed to load history file (%s): %s. " +
"History will not be available during this session.%n",
historyFile, e.getMessage());
history = new MemoryHistory();
}
history.setAutoTrim(true);
return history;
}