File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/src/dotty/tools/repl Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,15 @@ final class JLineTerminal(needsTerminal: Boolean) extends java.io.Closeable {
4747 )(implicit ctx : Context ): String = {
4848 import LineReader .Option ._
4949 import LineReader ._
50- val lineReader = LineReaderBuilder .builder()
50+ val userHome = System .getProperty(" user.home" )
51+ val lineReader = LineReaderBuilder
52+ .builder()
5153 .terminal(terminal)
5254 .history(history)
5355 .completer(completer)
5456 .highlighter(new Highlighter )
5557 .parser(new Parser )
58+ .variable(HISTORY_FILE , s " $userHome/.dotty_history " ) // Save history to file
5659 .variable(SECONDARY_PROMPT_PATTERN , " %M" ) // A short word explaining what is "missing",
5760 // this is supplied from the EOFError.getMissing() method
5861 .variable(LIST_MAX , 400 ) // Ask user when number of completions exceed this limit (default is 100).
You can’t perform that action at this time.
0 commit comments