mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 19:20:29 +00:00
Add setting for .lua extension (#278)
* Add setting for .lua extension * Feedback from SquidDev * Feedback from dan200 * All requested changes are done * Better description * Cleaner check
This commit is contained in:
parent
54d202cf6b
commit
99b5534099
@ -817,7 +817,8 @@ end
|
||||
settings.set( "shell.allow_startup", true )
|
||||
settings.set( "shell.allow_disk_startup", (commands == nil) )
|
||||
settings.set( "shell.autocomplete", true )
|
||||
settings.set( "edit.autocomplete", true )
|
||||
settings.set( "edit.autocomplete", true )
|
||||
settings.set( "edit.default_extension", "lua" )
|
||||
settings.set( "lua.autocomplete", true )
|
||||
settings.set( "list.show_hidden", false )
|
||||
if term.isColour() then
|
||||
|
@ -11,6 +11,7 @@ Default Settings:
|
||||
shell.autocomplete - enables auto-completion in the Shell.
|
||||
lua.autocomplete - enables auto-completion in the Lua program.
|
||||
edit.autocomplete - enables auto-completion in the Edit program.
|
||||
edit.default_extension - sets the default file extension for files created with the Edit program
|
||||
bios.use_multishell - enables Multishell on Advanced Computers, Turtles, Pocket Computers and Command Computers.
|
||||
shell.allow_disk_startup - if a Disk Drive with a Disk inside that has a 'startup' script is attached to a computer, this setting allows to automatically run that script when the computer starts.
|
||||
shell.allow_startup - if there is a 'startup' script in a computer's root, this setting allow to automatically run that script when the computer runs.
|
||||
|
@ -15,7 +15,10 @@ end
|
||||
|
||||
-- Create .lua files by default
|
||||
if not fs.exists( sPath ) and not string.find( sPath, "%." ) then
|
||||
sPath = sPath .. ".lua"
|
||||
local sExtension = settings.get("edit.default_extension", "" )
|
||||
if sExtension ~= "" then
|
||||
sPath = sPath .. "." .. sExtension
|
||||
end
|
||||
end
|
||||
|
||||
local x,y = 1,1
|
||||
|
Loading…
Reference in New Issue
Block a user