From bd36b4081472a630ca9be297d4816826a319b6e8 Mon Sep 17 00:00:00 2001 From: Hassan El-Mehalawi Date: Tue, 1 Oct 2024 14:36:39 +0300 Subject: [PATCH] fix: use quotes to allow filtering on files with spaces in path (#141) :LazyGitFilterCurrentFile currently breaks if the path of the file contains a space. Fixed by wrapping the path in quotes. --- lua/lazygit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazygit.lua b/lua/lazygit.lua index 764247b..770e042 100644 --- a/lua/lazygit.lua +++ b/lua/lazygit.lua @@ -132,7 +132,7 @@ local function lazygitfilter(path) end prev_win = vim.api.nvim_get_current_win() win, buffer = open_floating_window() - local cmd = "lazygit " .. "-f " .. path + local cmd = "lazygit " .. "-f " .. "'" .. path .. "'" exec_lazygit_command(cmd) end