mirror of
https://github.com/kepler155c/opus
synced 2025-10-24 04:07:40 +00:00
rename shell -> shell.lua
This commit is contained in:
@@ -347,7 +347,7 @@ function Browser:eventHandler(event)
|
||||
self:run('cedit', file.name)
|
||||
|
||||
elseif event.type == 'shell' then
|
||||
self:run('sys/apps/shell')
|
||||
self:run('sys/apps/shell.lua')
|
||||
|
||||
elseif event.type == 'refresh' then
|
||||
self:updateDirectory(self.dir)
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
if not _G.requireInjector then
|
||||
local BASE ='https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/apis'
|
||||
_ENV.LUA_PATH=BASE .. '/?.lua'
|
||||
load(_G.http.get(BASE .. '/injector.lua').readAll())()(_ENV)
|
||||
end
|
||||
-- Lua may be called from outside of shell - inject a require
|
||||
_G.requireInjector(_ENV)
|
||||
|
||||
local History = require('history')
|
||||
local UI = require('ui')
|
||||
|
||||
@@ -424,7 +424,7 @@ function page:eventHandler(event)
|
||||
shell.switchTab(shell.openTab(event.button.app.run))
|
||||
|
||||
elseif event.type == 'shell' then
|
||||
shell.switchTab(shell.openTab('sys/apps/shell'))
|
||||
shell.switchTab(shell.openTab('sys/apps/shell.lua'))
|
||||
|
||||
elseif event.type == 'lua' then
|
||||
shell.switchTab(shell.openTab('sys/apps/Lua.lua'))
|
||||
|
||||
@@ -36,7 +36,6 @@ local page = UI.Page {
|
||||
description = UI.TextArea {
|
||||
x = 16, y = 3, ey = -5,
|
||||
marginRight = 0, marginLeft = 0,
|
||||
--backgroundColor = colors.white,
|
||||
},
|
||||
load = UI.Button {
|
||||
x = 22, y = -3,
|
||||
@@ -45,10 +44,8 @@ local page = UI.Page {
|
||||
help = 'Download the latest package list',
|
||||
},
|
||||
action = UI.SlideOut {
|
||||
backgroundColor = colors.brown,
|
||||
y = 3,
|
||||
backgroundColor = colors.cyan,
|
||||
titleBar = UI.TitleBar {
|
||||
backgroundColor = colors.brown,
|
||||
event = 'hide-action',
|
||||
},
|
||||
button = UI.Button {
|
||||
|
||||
@@ -314,9 +314,9 @@ function shell.newTab(tabInfo, ...)
|
||||
tabInfo.args = args
|
||||
tabInfo.title = fs.getName(path):match('([^%.]+)')
|
||||
|
||||
if path ~= 'sys/apps/shell' then
|
||||
if path ~= 'sys/apps/shell.lua' then
|
||||
table.insert(tabInfo.args, 1, tabInfo.path)
|
||||
tabInfo.path = 'sys/apps/shell'
|
||||
tabInfo.path = 'sys/apps/shell.lua'
|
||||
end
|
||||
return _ENV.multishell.openTab(tabInfo)
|
||||
end
|
||||
@@ -329,10 +329,10 @@ function shell.openTab( ... )
|
||||
local sCommand = tWords[1]
|
||||
if sCommand then
|
||||
local sPath = shell.resolveProgram(sCommand)
|
||||
if sPath == "sys/apps/shell" then
|
||||
if sPath == "sys/apps/shell.lua" then
|
||||
return _ENV.multishell.launch(Util.shallowCopy(sandboxEnv), sPath, table.unpack(tWords, 2))
|
||||
else
|
||||
return _ENV.multishell.launch(Util.shallowCopy(sandboxEnv), "sys/apps/shell", sCommand, table.unpack(tWords, 2))
|
||||
return _ENV.multishell.launch(Util.shallowCopy(sandboxEnv), "sys/apps/shell.lua", sCommand, table.unpack(tWords, 2))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user