v0.7.0 - Added basic CLI tools: ls, cd, cp, mv, rm, lua

This commit is contained in:
TheWahlolly
2025-04-27 10:13:12 +03:00
parent 64a761fdde
commit 109c0beffb
19 changed files with 347 additions and 16 deletions
+19
View File
@@ -0,0 +1,19 @@
print("\27[44m".._VERSION.."\27[0m shell")
print('Type "exit" to exit.')
while true do
print("\27[44mlua>\27[0m ", false)
local command = read()
if command == "exit" then
return
else
local function runCommand()
assert(load(command))()
end
local result, reason = xpcall(runCommand, function(errMsg)
return errMsg .. "\n\n" .. debug.traceback()
end)
if not result then
print("\27[91m" .. reason)
end
end
end