2017-10-07 23:33:00 +11:00
|
|
|
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))
|
2017-10-08 00:24:01 +11:00
|
|
|
print("lush v1/".._VERSION)
|
2017-10-07 23:33:00 +11:00
|
|
|
while true do
|
|
|
|
local didexec = false
|
|
|
|
write((os.getenv("PWD") or "").."> ")
|
|
|
|
local inp=readln()
|
|
|
|
if not inp then break end
|
2017-10-08 00:24:01 +11:00
|
|
|
local rt = {shutil.exec(inp)}
|
2017-10-07 23:33:00 +11:00
|
|
|
if rt[1] == true then
|
|
|
|
table.remove(rt,1)
|
|
|
|
end
|
|
|
|
print(table.unpack(rt))
|
|
|
|
end
|
|
|
|
end)) end)
|