diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-01-28 20:54:57 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-01-28 20:54:57 -0800 |
commit | b6ea96bb07c6497b0913e7b5d87a09033d86e09a (patch) | |
tree | c6364daebe2cf54c944bdfc60ee258f221ce7d6a | |
parent | 840b56b0029c39cd184ff3ed9595b329e68070d6 (diff) | |
download | mu-b6ea96bb07c6497b0913e7b5d87a09033d86e09a.tar.gz |
663 - exit repl on ctrl-d
-rw-r--r-- | color-repl.mu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/color-repl.mu b/color-repl.mu index aaa7bd58..3042c1cf 100644 --- a/color-repl.mu +++ b/color-repl.mu @@ -18,6 +18,12 @@ next-key (c:character <- $wait-for-key-from-host) (check-abort c:character) + ; check for ctrl-d and exit + { begin + (eof?:boolean <- equal c:character ((ctrl-d literal))) + (break-unless eof?:boolean) + (reply nil:literal) + } ; check for backspace ; test: 3<backspace>4<enter> ; todo: backspace past newline @@ -302,6 +308,7 @@ { begin (print-primitive-to-host (("anarki> " literal))) (s:string-address <- read-sexp) + (break-unless s:string-address) (retro-mode) ; print errors cleanly (t:string-address <- $eval s:string-address) (cursor-mode) |