From 3d932ac480c595448de6768635275025bdc8956e Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Tue, 1 Aug 2017 16:38:43 +1000 Subject: [PATCH] made luash nicer to use --- modules/applications/luash.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/applications/luash.lua b/modules/applications/luash.lua index 5461ba2..ffdef91 100644 --- a/modules/applications/luash.lua +++ b/modules/applications/luash.lua @@ -5,7 +5,11 @@ spawn("lua shell",function() print(_VERSION) while true do write((os.getenv("PWD") or "").."> ") - print(pcall(load(readln()))) + local inp=readln() + if inp:sub(1,1) == "=" then inp="return "..inp:sub(2) end + local r={pcall(load(inp))} + if r[1] == true then table.remove(r,1) end + print(table.unpack(r)) end end,si) end