259 posts
Posted 11 June 2016 - 02:38 AM
I use sublime to code and I like the colors. The colors are automatically there when you use a .lua file. If I had a file named blah.lua, I want to be able to go to a computer and run "blah" and have it search for "blah" then try "blah.lua". The 2 ways I can think of to do this are to edit craftOS in the computercraft files which I don't want to do, or run a separate program with it as an argument. ie. "run blah", which defeats the purpose.
Edited on 11 June 2016 - 01:36 AM
7083 posts
Location
Tasmania (AU)
Posted 11 June 2016 - 02:54 AM
At a glance, it
looks like you may be able to do this by overriding
shell.resolveProgram():
local oldShellResolve = shell.resolveProgram
shell.resolveProgram = function(program)
return oldShellResolve(program) or oldShellResolve(program .. ".lua")
end
… though I haven't tested this.
259 posts
Posted 11 June 2016 - 03:35 AM
At a glance, it
looks like you may be able to do this by overriding
shell.resolveProgram():
local oldShellResolve = shell.resolveProgram
shell.resolveProgram = function(program)
return oldShellResolve(program) or oldShellResolve(program .. ".lua")
end
… though I haven't tested this.
You sir, are a genius! Works wonders