2022-12-07 21:01:59 +01:00
|
|
|
import editor
|
|
|
|
|
2022-12-29 17:54:51 +01:00
|
|
|
let e = newEditor(">>> ")
|
2022-12-07 21:01:59 +01:00
|
|
|
|
|
|
|
while true:
|
2022-12-28 18:12:29 +01:00
|
|
|
let (res, text) = e.read()
|
|
|
|
if res in {erCtrlC, erCtrlD} or text == "quit":
|
2022-12-07 21:01:59 +01:00
|
|
|
break
|
2022-12-29 15:54:08 +01:00
|
|
|
if text.len() > 0:
|
|
|
|
echo text
|