WorkDir concept

This commit is contained in:
Krzosa Karol
2025-05-12 16:35:06 +02:00
parent fd842a1f70
commit a94b914e06
10 changed files with 59 additions and 60 deletions

View File

@@ -238,7 +238,7 @@ function MatchExec(s, meta)
return nil
end
if s:match(".exe$") then
if s:match(".exe$") or s:match(".bat$") or s:match(".sh$") then
return {kind = "exec_console", cmd = s, working_dir = GetMainDir()}
end
@@ -283,7 +283,7 @@ table.insert(OnCommandCallbacks, function (e)
if e.key == SDLK_F and e.ctrl == 1 and e.shift == 1 then
C("git grep -n "..GetLoadWord().." :/") end
if e.key == SDLK_B and e.ctrl == 1 then
Cmd { working_dir = GetProjectDir(), kind = "console", cmd = "build.bat" } end
Cmd { working_dir = GetWorkDir(), kind = "console", cmd = "build.bat" } end
end)
function OnUpdate(e)