OC-PsychOS/exec/lush.lua

21 lines
452 B
Lua

local tA = {...}
local si = tA[1]
spawn("lua shell", function() print(pcall(function()
os.setenv("sI",si)
_ENV = shutil.genenv()
coroutine.yield()
log(pcall(login))
print("lush v1/".._VERSION)
while true do
local didexec = false
write((os.getenv("PWD") or "").."> ")
local inp=readln()
if not inp then break end
local rt = {shutil.exec(inp)}
if rt[1] == true then
table.remove(rt,1)
end
print(table.unpack(rt))
end
end)) end)