From ce6e4059348808e1f1921e035b020ecf369f522d Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Tue, 26 Nov 2019 18:47:20 +1100 Subject: [PATCH] the shell now prints tables that are returned as a serialized value --- exec/shell.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exec/shell.lua b/exec/shell.lua index 6297609..325d318 100644 --- a/exec/shell.lua +++ b/exec/shell.lua @@ -1,3 +1,4 @@ +local serial = require "serialization" print(pcall(function() local shenv = {} function shenv.quit() @@ -49,7 +50,11 @@ while os.getenv("run") do tResult = {pcall(load(input,"shell","t",shenv))} if tResult[1] == true then table.remove(tResult,1) end for k,v in pairs(tResult) do - print(v) + if type(v) == "table" then + print(serial.serialize(v)) + else + print(v) + end end end end))