OC-PsychOS/modules/applications/luash.lua
2017-07-31 23:23:57 +10:00

15 lines
421 B
Lua

function luash(si)
spawn("lua shell",function()
function cd(p)
os.setenv("PWD",fs.simplify((os.getenv("PWD") or "").."/"..p))
end
coroutine.yield()
print(_OSVERSION..", "..string.format("%4d",computer.totalMemory()/1024).."K memory, "..string.format("%4d",computer.freeMemory()/1024).."K free")
print(_VERSION)
while true do
write((os.getenv("PWD") or "").."> ")
print(pcall(load(readln())))
end
end,si)
end