about summary refs log tree commit diff stats
path: root/lua/chupacabra
diff options
context:
space:
mode:
Diffstat (limited to 'lua/chupacabra')
-rwxr-xr-xlua/chupacabra/repl14
1 files changed, 13 insertions, 1 deletions
diff --git a/lua/chupacabra/repl b/lua/chupacabra/repl
index 6cfaabc..aeefe4a 100755
--- a/lua/chupacabra/repl
+++ b/lua/chupacabra/repl
@@ -1,3 +1,15 @@
 #!/usr/bin/env sh
 
-rlwrap lua repl.lua
\ No newline at end of file
+if ! command -v lua &> /dev/null
+then
+    echo "lua is not installed"
+    exit
+fi
+
+if ! command -v rlwrap &> /dev/null
+then
+    lua repl.lua
+else 
+    rlwrap lua repl.lua
+fi
+