1
1
mirror da https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-10-02 08:39:32 -04:00
OC-PsychOS2/exec/shell.lua

12 righe
424 B
Lua

local shenv = {}
setmetatable(shenv,{__index=function(_,k) if _G[k] then return _G[k] elseif fs.exists("/boot/exec/"..k..".lua") then return loadfile("/boot/exec/"..k..".lua") end end})
print(_VERSION)
while true do
io.write((os.getenv("PWD") or _VERSION).."> ")
tResult = {pcall(load(io.read(),"shell","t",shenv))}
if tResult[1] == true then table.remove(tResult,1) end
for k,v in pairs(tResult) do
print(v)
end
end