Exec command as meta to Open
This commit is contained in:
@@ -233,11 +233,25 @@ function MatchGotoBuild(s, meta)
|
||||
return nil
|
||||
end
|
||||
|
||||
function MatchExec(s, meta)
|
||||
if meta ~= "exec" then
|
||||
return nil
|
||||
end
|
||||
|
||||
if s:match(".exe$") then
|
||||
return {kind = "exec_console", cmd = s, working_dir = GetMainDir()}
|
||||
end
|
||||
|
||||
Eval(s)
|
||||
return {kind = "skip"}
|
||||
end
|
||||
|
||||
OnOpenMatchers = {
|
||||
MatchWindowsPath,
|
||||
MatchGitCommit,
|
||||
MatchURL,
|
||||
MatchGotoBuild,
|
||||
MatchExec,
|
||||
}
|
||||
|
||||
function OnOpen(path, meta)
|
||||
|
||||
Reference in New Issue
Block a user