Save repl history to file and recall on next session

This commit is contained in:
obscuren
2014-06-24 10:09:02 +02:00
parent a13aa873c2
commit fd1ddbce68
2 changed files with 29 additions and 2 deletions

View File

@ -102,7 +102,9 @@ L:
break L
}
addHistory(str[:len(str)-1]) //allow user to recall this line
hist := str[:len(str)-1]
addHistory(hist) //allow user to recall this line
self.history.WriteString(str)
self.parseInput(str)