mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 11:40:29 +00:00
Merge pull request #250 from Wilma456/luaex
Add .lua extension to all programs and startup (updated)
This commit is contained in:
commit
25a18ee33a
@ -856,12 +856,12 @@ local ok, err = pcall( function()
|
|||||||
function()
|
function()
|
||||||
local sShell
|
local sShell
|
||||||
if term.isColour() and settings.get( "bios.use_multishell" ) then
|
if term.isColour() and settings.get( "bios.use_multishell" ) then
|
||||||
sShell = "rom/programs/advanced/multishell"
|
sShell = "rom/programs/advanced/multishell.lua"
|
||||||
else
|
else
|
||||||
sShell = "rom/programs/shell"
|
sShell = "rom/programs/shell.lua"
|
||||||
end
|
end
|
||||||
os.run( {}, sShell )
|
os.run( {}, sShell )
|
||||||
os.run( {}, "rom/programs/shutdown" )
|
os.run( {}, "rom/programs/shutdown.lua" )
|
||||||
end,
|
end,
|
||||||
function()
|
function()
|
||||||
rednet.run()
|
rednet.run()
|
||||||
|
@ -216,7 +216,7 @@ setMenuVisible( false )
|
|||||||
selectProcess( launchProcess( {
|
selectProcess( launchProcess( {
|
||||||
["shell"] = shell,
|
["shell"] = shell,
|
||||||
["multishell"] = multishell,
|
["multishell"] = multishell,
|
||||||
}, "/rom/programs/shell" ) )
|
}, "/rom/programs/shell.lua" ) )
|
||||||
redrawMenu()
|
redrawMenu()
|
||||||
|
|
||||||
-- Run processes
|
-- Run processes
|
@ -316,10 +316,10 @@ if multishell then
|
|||||||
local sCommand = tWords[1]
|
local sCommand = tWords[1]
|
||||||
if sCommand then
|
if sCommand then
|
||||||
local sPath = shell.resolveProgram( sCommand )
|
local sPath = shell.resolveProgram( sCommand )
|
||||||
if sPath == "rom/programs/shell" then
|
if sPath == "rom/programs/shell.lua" then
|
||||||
return multishell.launch( tEnv, sPath, table.unpack( tWords, 2 ) )
|
return multishell.launch( tEnv, sPath, table.unpack( tWords, 2 ) )
|
||||||
elseif sPath ~= nil then
|
elseif sPath ~= nil then
|
||||||
return multishell.launch( tEnv, "rom/programs/shell", sCommand, table.unpack( tWords, 2 ) )
|
return multishell.launch( tEnv, "rom/programs/shell.lua", sCommand, table.unpack( tWords, 2 ) )
|
||||||
else
|
else
|
||||||
printError( "No such program" )
|
printError( "No such program" )
|
||||||
end
|
end
|
||||||
@ -347,7 +347,7 @@ else
|
|||||||
|
|
||||||
-- Run the startup program
|
-- Run the startup program
|
||||||
if parentShell == nil then
|
if parentShell == nil then
|
||||||
shell.run( "/rom/startup" )
|
shell.run( "/rom/startup.lua" )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Read commands and execute them
|
-- Read commands and execute them
|
@ -168,32 +168,32 @@ local function completeSet( shell, nIndex, sText, tPreviousText )
|
|||||||
return completeMultipleChoice( sText, settings.getNames(), true )
|
return completeMultipleChoice( sText, settings.getNames(), true )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
shell.setCompletionFunction( "rom/programs/alias", completeAlias )
|
shell.setCompletionFunction( "rom/programs/alias.lua", completeAlias )
|
||||||
shell.setCompletionFunction( "rom/programs/cd", completeDir )
|
shell.setCompletionFunction( "rom/programs/cd.lua", completeDir )
|
||||||
shell.setCompletionFunction( "rom/programs/copy", completeEitherEither )
|
shell.setCompletionFunction( "rom/programs/copy.lua", completeEitherEither )
|
||||||
shell.setCompletionFunction( "rom/programs/delete", completeEither )
|
shell.setCompletionFunction( "rom/programs/delete.lua", completeEither )
|
||||||
shell.setCompletionFunction( "rom/programs/drive", completeDir )
|
shell.setCompletionFunction( "rom/programs/drive.lua", completeDir )
|
||||||
shell.setCompletionFunction( "rom/programs/edit", completeFile )
|
shell.setCompletionFunction( "rom/programs/edit.lua", completeFile )
|
||||||
shell.setCompletionFunction( "rom/programs/eject", completePeripheral )
|
shell.setCompletionFunction( "rom/programs/eject.lua", completePeripheral )
|
||||||
shell.setCompletionFunction( "rom/programs/gps", completeGPS )
|
shell.setCompletionFunction( "rom/programs/gps.lua", completeGPS )
|
||||||
shell.setCompletionFunction( "rom/programs/help", completeHelp )
|
shell.setCompletionFunction( "rom/programs/help.lua", completeHelp )
|
||||||
shell.setCompletionFunction( "rom/programs/id", completePeripheral )
|
shell.setCompletionFunction( "rom/programs/id.lua", completePeripheral )
|
||||||
shell.setCompletionFunction( "rom/programs/label", completeLabel )
|
shell.setCompletionFunction( "rom/programs/label.lua", completeLabel )
|
||||||
shell.setCompletionFunction( "rom/programs/list", completeDir )
|
shell.setCompletionFunction( "rom/programs/list.lua", completeDir )
|
||||||
shell.setCompletionFunction( "rom/programs/mkdir", completeFile )
|
shell.setCompletionFunction( "rom/programs/mkdir.lua", completeFile )
|
||||||
shell.setCompletionFunction( "rom/programs/monitor", completeMonitor )
|
shell.setCompletionFunction( "rom/programs/monitor.lua", completeMonitor )
|
||||||
shell.setCompletionFunction( "rom/programs/move", completeEitherEither )
|
shell.setCompletionFunction( "rom/programs/move.lua", completeEitherEither )
|
||||||
shell.setCompletionFunction( "rom/programs/redstone", completeRedstone )
|
shell.setCompletionFunction( "rom/programs/redstone.lua", completeRedstone )
|
||||||
shell.setCompletionFunction( "rom/programs/rename", completeEitherEither )
|
shell.setCompletionFunction( "rom/programs/rename.lua", completeEitherEither )
|
||||||
shell.setCompletionFunction( "rom/programs/shell", completeProgram )
|
shell.setCompletionFunction( "rom/programs/shell.lua", completeProgram )
|
||||||
shell.setCompletionFunction( "rom/programs/type", completeEither )
|
shell.setCompletionFunction( "rom/programs/type.lua", completeEither )
|
||||||
shell.setCompletionFunction( "rom/programs/set", completeSet )
|
shell.setCompletionFunction( "rom/programs/set.lua", completeSet )
|
||||||
shell.setCompletionFunction( "rom/programs/advanced/bg", completeProgram )
|
shell.setCompletionFunction( "rom/programs/advanced/bg.lua", completeProgram )
|
||||||
shell.setCompletionFunction( "rom/programs/advanced/fg", completeProgram )
|
shell.setCompletionFunction( "rom/programs/advanced/fg.lua", completeProgram )
|
||||||
shell.setCompletionFunction( "rom/programs/fun/dj", completeDJ )
|
shell.setCompletionFunction( "rom/programs/fun/dj.lua", completeDJ )
|
||||||
shell.setCompletionFunction( "rom/programs/fun/advanced/paint", completeFile )
|
shell.setCompletionFunction( "rom/programs/fun/advanced/paint.lua", completeFile )
|
||||||
shell.setCompletionFunction( "rom/programs/http/pastebin", completePastebin )
|
shell.setCompletionFunction( "rom/programs/http/pastebin.lua", completePastebin )
|
||||||
shell.setCompletionFunction( "rom/programs/rednet/chat", completeChat )
|
shell.setCompletionFunction( "rom/programs/rednet/chat.lua", completeChat )
|
||||||
|
|
||||||
-- Run autorun files
|
-- Run autorun files
|
||||||
if fs.exists( "/rom/autorun" ) and fs.isDir( "/rom/autorun" ) then
|
if fs.exists( "/rom/autorun" ) and fs.isDir( "/rom/autorun" ) then
|
Loading…
Reference in New Issue
Block a user