2021-02-19 11:27:27 +01:00
|
|
|
import jale/plugin/defaults
|
|
|
|
import jale/plugin/history
|
|
|
|
import jale/plugin/editor_history
|
|
|
|
import jale/editor
|
|
|
|
import jale/templates
|
|
|
|
|
|
|
|
import strutils
|
2021-02-15 20:18:31 +01:00
|
|
|
|
|
|
|
var keep = true
|
|
|
|
|
|
|
|
let e = newLineEditor()
|
|
|
|
|
|
|
|
e.bindEvent(jeQuit):
|
|
|
|
keep = false
|
|
|
|
|
|
|
|
e.prompt = "> "
|
|
|
|
e.populateDefaults()
|
2021-02-18 23:58:47 +01:00
|
|
|
let h = e.plugHistory()
|
|
|
|
e.bindHistory(h)
|
2021-02-18 21:31:03 +01:00
|
|
|
|
2021-02-15 20:18:31 +01:00
|
|
|
while keep:
|
|
|
|
let input = e.read()
|
2021-02-15 20:59:40 +01:00
|
|
|
echo "output:<" & input.replace("\n", "\\n") & ">"
|
2021-02-15 22:13:12 +01:00
|
|
|
|