Skip to content

Commit

Permalink
fix: folders names ending in square brackets (closes #925)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Nov 8, 2023
1 parent b1b734a commit e104672
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/fzf-lua/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,9 @@ M.mt_cmd_wrapper = function(opts)
assert(opts and opts.cmd)

local str_to_str = function(s)
return "[[" .. s:gsub("[%]]", function(x) return "\\" .. x end) .. "]]"
-- use long format of bracket escape so we can include "]" (#925)
-- https://www.lua.org/manual/5.4/manual.html#3.1
return "[==[" .. s .. "]==]"
end

local opts_to_str = function(o)
Expand Down

0 comments on commit e104672

Please sign in to comment.