Skip to content

Commit

Permalink
fix(lazygit): allow extensible user args
Browse files Browse the repository at this point in the history
  • Loading branch information
dpetka2001 committed Feb 14, 2025
1 parent 0391125 commit 9ae54d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/snacks/lazygit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ function M.log(opts)
end

-- Opens lazygit with the log of the current file
---@param opts? snacks.lazygit.Config
---@param opts? snacks.lazygit.Config|{}
function M.log_file(opts)
local file = vim.trim(vim.api.nvim_buf_get_name(0))
opts = opts or {}
opts.args = { "-f", file }
opts.args = vim.list_extend(opts.args or {}, { "-f", file })
opts.cwd = vim.fn.fnamemodify(file, ":h")
return M.open(opts)
end
Expand Down

0 comments on commit 9ae54d8

Please sign in to comment.