File tree 1 file changed +4
-1
lines changed
compiler/src/dotty/tools/repl 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 {
47
47
)(implicit ctx : Context ): String = {
48
48
import LineReader .Option ._
49
49
import LineReader ._
50
- val lineReader = LineReaderBuilder .builder()
50
+ val userHome = System .getProperty(" user.home" )
51
+ val lineReader = LineReaderBuilder
52
+ .builder()
51
53
.terminal(terminal)
52
54
.history(history)
53
55
.completer(completer)
54
56
.highlighter(new Highlighter )
55
57
.parser(new Parser )
58
+ .variable(HISTORY_FILE , s " $userHome/.dotty_history " ) // Save history to file
56
59
.variable(SECONDARY_PROMPT_PATTERN , " %M" ) // A short word explaining what is "missing",
57
60
// this is supplied from the EOFError.getMissing() method
58
61
.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