Skip to content

Commit

Permalink
Merge pull request #8 from donalffons/fix/white-spaces-in-path
Browse files Browse the repository at this point in the history
fix DiffviewOpen error with white spaces in path
  • Loading branch information
agoodshort authored Aug 6, 2024
2 parents ece2164 + df221bf commit e9bbf8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/telescope/_extensions/git_submodules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ local function prepare_repos()
for s in string.gmatch(submodules_heads, "[^" .. "\n" .. "]+") do
for w in string.gmatch(s, "[^" .. " " .. "]+") do
if entering == i then
repo_name = w:gsub("%'", ""):gsub("%'", "")
repo_name = (repo_name and repo_name .. " " or "") .. w:gsub("%'", ""):gsub("%'", "")
elseif entering == i - 1 then
repo_branch = s
elseif w == "Entering" then
Expand Down Expand Up @@ -135,7 +135,7 @@ local show_repos = function(opts)
t[#t + 1] = chunk
end
else
local s = vim.fn.system("git -C " .. entry.value .. " status -s")
local s = vim.fn.system('git -C "' .. entry.value .. '" status -s')
for chunk in string.gmatch(s, "[^\n]+") do
t[#t + 1] = chunk
end
Expand Down Expand Up @@ -208,7 +208,7 @@ local show_repos = function(opts)
dir = dir .. "/" .. selection
end
actions.close(prompt_buf)
vim.cmd(("DiffviewOpen -C%s"):format(dir))
vim.cmd(('DiffviewOpen -C"%s"'):format(dir))
end)
end
return true
Expand Down

0 comments on commit e9bbf8b

Please sign in to comment.