made luash nicer to use
This commit is contained in:
parent
72e71c4c23
commit
3d932ac480
@ -5,7 +5,11 @@ spawn("lua shell",function()
|
|||||||
print(_VERSION)
|
print(_VERSION)
|
||||||
while true do
|
while true do
|
||||||
write((os.getenv("PWD") or "").."> ")
|
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
|
||||||
end,si)
|
end,si)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user