1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-17 16:57:39 +00:00

transition to kernel

This commit is contained in:
kepler155c@gmail.com
2018-01-21 05:44:13 -05:00
parent 1c1eb9b782
commit e59400eb2b
16 changed files with 87 additions and 72 deletions

View File

@@ -304,7 +304,7 @@ function shell.newTab(tabInfo, ...)
if path then
tabInfo.path = path
tabInfo.env = sandboxEnv
tabInfo.env = Util.shallowCopy(sandboxEnv)
tabInfo.args = args
tabInfo.title = fs.getName(path):match('([^%.]+)')
@@ -319,7 +319,18 @@ end
function shell.openTab( ... )
-- needs to use multishell.launch .. so we can run with stock multishell
return shell.newTab({ }, ...)
local tWords = tokenise( ... )
local sCommand = tWords[1]
if sCommand then
local sPath = shell.resolveProgram(sCommand)
if sPath == "sys/apps/shell" then
return _ENV.multishell.launch(Util.shallowCopy(sandboxEnv), sPath, table.unpack(tWords, 2))
elseif sPath ~= nil then
return _ENV.multishell.launch(Util.shallowCopy(sandboxEnv), "sys/apps/shell", sCommand, table.unpack(tWords, 2))
else
_G.printError( "No such program" )
end
end
end
function shell.openForegroundTab( ... )