Merge branch 'main' of https://git.astronand.dev/Hyperion/HyperionOS
This commit is contained in:
@@ -173,6 +173,17 @@ local function getUserInput()
|
||||
end
|
||||
|
||||
local function runCommand(command)
|
||||
do
|
||||
local func = load("return " .. command, "@equation", "t", {})
|
||||
if func then
|
||||
local success, result = pcall(func)
|
||||
if success and type(result) == "number" then
|
||||
print(result)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
terminate = false
|
||||
local args = string.split(command, " ")
|
||||
if builtinCmds[args[1]] then
|
||||
|
||||
@@ -20,4 +20,5 @@ while content~=nil or file == 0 do
|
||||
content=syscall.read(file, 1024)
|
||||
printInline(content)
|
||||
end
|
||||
syscall.close(file)
|
||||
syscall.close(file)
|
||||
print("")
|
||||
Reference in New Issue
Block a user