about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-06-09 19:42:46 -0400
committerelioat <elioat@tilde.institute>2024-06-09 19:42:46 -0400
commit7a2893078d934cd5cb3b9fdd572f25a5b5d81b92 (patch)
treecf1897b4bad09239a37933810db1ef410861ec63
parentab9c099df31d036c9bbd7e94e32a97e9cffc8e12 (diff)
downloadtour-7a2893078d934cd5cb3b9fdd572f25a5b5d81b92.tar.gz
*
-rwxr-xr-xlua/chupacabra/repl3
-rw-r--r--lua/chupacabra/repl.lua4
2 files changed, 5 insertions, 2 deletions
diff --git a/lua/chupacabra/repl b/lua/chupacabra/repl
new file mode 100755
index 0000000..6cfaabc
--- /dev/null
+++ b/lua/chupacabra/repl
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+rlwrap lua repl.lua
\ No newline at end of file
diff --git a/lua/chupacabra/repl.lua b/lua/chupacabra/repl.lua
index bed67c2..55e10a4 100644
--- a/lua/chupacabra/repl.lua
+++ b/lua/chupacabra/repl.lua
@@ -20,7 +20,7 @@ local function scratch(input)
     table.insert(stack, {input = input, output = output})
 end
 
-local function print_stack()
+local function scratch_out()
     for i, entry in ipairs(stack) do
         print("   input: " .. entry.input)
         if type(entry.output) == "table" then
@@ -38,6 +38,6 @@ while true do
         break
     end
     scratch(input)
-    print_stack()
+    scratch_out()
     stack = {}
 end
\ No newline at end of file