fix(from_entry): escape paths with $ symbol (#2412)

Adds support for viewing File Previews of paths with dollar symbols.
This commit is contained in:
James Trew
2023-04-09 12:09:13 -04:00
committed by GitHub
parent 2ea61f1952
commit 7141515a7c

View File

@@ -30,7 +30,7 @@ function from_entry.path(entry, validate, escape)
-- TODO(conni2461): we are not going to return the expanded path because
-- this would lead to cache misses in the perviewer.
-- Requires overall refactoring in previewer interface
local expanded = vim.fn.expand(vim.fn.escape(path, "?*[]"))
local expanded = vim.fn.expand(vim.fn.escape(path, "$?*[]"))
if (vim.fn.filereadable(expanded) + vim.fn.isdirectory(expanded)) == 0 then
return
end