diff options
author | ubq323 <ubq323@ubq323.website> | 2023-04-17 01:46:29 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-04-17 01:46:29 +0100 |
commit | 211fbe3a7f367e8df1a9d21c70fb867220c5f90d (patch) | |
tree | c05e7813ae7882f6a07e3f1319aad06230a1729b | |
parent | cb960abcd79e3a659f1abedc407cb388f32d8ff8 (diff) |
quit nicely on eof (ctrl-d)
-rw-r--r-- | repl.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -32,6 +32,9 @@ local function read_chunk() -- if error ends in <eof> try multiline local function try(text) + if text == nil then + os.exit() + end if text:sub(1,3) == ",r " then return function() reload(text:sub(4)) print("reloaded "..text:sub(4)) end end |