feat: add LazyGitFilterCurrentFile command
This commit is contained in:
@@ -82,6 +82,12 @@ local function lazygitfilter(path)
|
|||||||
exec_lazygit_command(cmd)
|
exec_lazygit_command(cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- :LazyGitFilterCurrentFile entry point
|
||||||
|
local function lazygitfiltercurrentfile()
|
||||||
|
local current_file = vim.fn.expand('%')
|
||||||
|
lazygitfilter(current_file)
|
||||||
|
end
|
||||||
|
|
||||||
--- :LazyGitConfig entry point
|
--- :LazyGitConfig entry point
|
||||||
local function lazygitconfig()
|
local function lazygitconfig()
|
||||||
local os = fn.substitute(fn.system('uname'), '\n', '', '')
|
local os = fn.substitute(fn.system('uname'), '\n', '', '')
|
||||||
@@ -115,6 +121,7 @@ end
|
|||||||
return {
|
return {
|
||||||
lazygit = lazygit,
|
lazygit = lazygit,
|
||||||
lazygitfilter = lazygitfilter,
|
lazygitfilter = lazygitfilter,
|
||||||
|
lazygitfiltercurrentfile = lazygitfiltercurrentfile,
|
||||||
lazygitconfig = lazygitconfig,
|
lazygitconfig = lazygitconfig,
|
||||||
project_root_dir = project_root_dir,
|
project_root_dir = project_root_dir,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ command! LazyGit lua require'lazygit'.lazygit()
|
|||||||
|
|
||||||
command! LazyGitFilter lua require'lazygit'.lazygitfilter()
|
command! LazyGitFilter lua require'lazygit'.lazygitfilter()
|
||||||
|
|
||||||
|
command! LazyGitFilterCurrentFile lua require'lazygit'.lazygitfiltercurrentfile()
|
||||||
|
|
||||||
command! LazyGitConfig lua require'lazygit'.lazygitconfig()
|
command! LazyGitConfig lua require'lazygit'.lazygitconfig()
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|||||||
Reference in New Issue
Block a user