mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-26 04:57:24 -05:00
made the shell able to handle table values
This commit is contained in:
parent
39ea9c1a18
commit
7974ff9702
@ -1,3 +1,4 @@
|
|||||||
|
local serial = require "serialization"
|
||||||
local shell = {}
|
local shell = {}
|
||||||
shell.include = {"shutil"}
|
shell.include = {"shutil"}
|
||||||
local function shindex(self,k)
|
local function shindex(self,k)
|
||||||
@ -25,8 +26,17 @@ function shell.interactive()
|
|||||||
local rt = {pcall(f)}
|
local rt = {pcall(f)}
|
||||||
local rs = table.remove(rt,1)
|
local rs = table.remove(rt,1)
|
||||||
for k,v in pairs(rt) do
|
for k,v in pairs(rt) do
|
||||||
|
if type(v) == "table" then
|
||||||
|
local w, s = pcall(serial.serialize,v)
|
||||||
|
if w then
|
||||||
|
print(s)
|
||||||
|
else
|
||||||
print(tostring(v))
|
print(tostring(v))
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
print(tostring(v))
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user