From: <cg...@us...> - 2007-05-06 06:17:18
|
Revision: 3211 http://svn.sourceforge.net/jython/?rev=3211&view=rev Author: cgroves Date: 2007-05-05 23:17:17 -0700 (Sat, 05 May 2007) Log Message: ----------- patch #1707557 from crotwell. Store history for jline. Modified Paths: -------------- trunk/jython/src/org/python/util/JLineConsole.java Modified: trunk/jython/src/org/python/util/JLineConsole.java =================================================================== --- trunk/jython/src/org/python/util/JLineConsole.java 2007-05-06 06:12:35 UTC (rev 3210) +++ trunk/jython/src/org/python/util/JLineConsole.java 2007-05-06 06:17:17 UTC (rev 3211) @@ -1,5 +1,6 @@ package org.python.util; +import java.io.File; import java.io.IOException; import jline.ConsoleReader; import jline.Terminal; @@ -19,6 +20,13 @@ public JLineConsole(PyObject locals) { this(locals, CONSOLE_FILENAME); + try { + File historyFile = new File(System.getProperty("user.home"), + ".jline-jython.history"); + reader.getHistory().setHistoryFile(historyFile); + } catch(IOException e) { + // oh well, no history from file + } } public JLineConsole(PyObject locals, String filename) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |