From 9de317bdea2bc393074651179c4fc7f93e9b2d56 Mon Sep 17 00:00:00 2001 From: James Trew <66286082+jamestrew@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:09:13 -0400 Subject: [PATCH] fix(from_entry): escape paths with `$` symbol (#2412) Adds support for viewing File Previews of paths with dollar symbols. (cherry picked from commit 7141515a7cabde46449675a403ed564416363887) --- lua/telescope/from_entry.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/from_entry.lua b/lua/telescope/from_entry.lua index 2c6e523f4e..4592d9bd16 100644 --- a/lua/telescope/from_entry.lua +++ b/lua/telescope/from_entry.lua @@ -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