Opening new buffer which is git show commit command

This commit is contained in:
Krzosa Karol
2024-08-08 07:24:13 +02:00
parent 161a9e3965
commit 080669b5e9
8 changed files with 55 additions and 16 deletions

View File

@@ -312,11 +312,18 @@ function MatchAgainstIncludes(s)
return nil
end
function MatchGitCommit(s)
local command = "git --no-pager show "..s
return {kind = "exec", cmd = command, working_dir = GetCurrentBufferDir()}
end
Rules = {
GenericTextFileRule,
MatchAgainstIncludes,
MatchGitCommit,
}
function ApplyRules(s)
for i = #Rules,1,-1 do
rule = Rules[i]