fix(git): use compatible function for windows and linux (#2740)

This commit is contained in:
craempler 2024-03-15 18:01:33 +01:00 committed by GitHub
parent 0107a1079b
commit 42a7e79d5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -130,7 +130,7 @@ map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root
map("n", "<leader>gG", function() Util.terminal({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gf", function()
local git_path = vim.fn.system("git ls-files --full-name " .. vim.api.nvim_buf_get_name(0))
local git_path = vim.api.nvim_buf_get_name(0)
Util.terminal({ "lazygit", "-f", vim.trim(git_path) }, { esc_esc = false, ctrl_hjkl = false })
end, { desc = "Lazygit current file history" })