-
-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expand paths more selectively #2628
Conversation
I'd like to test run this for a couple of days because it touches some code that i never wanted to touch again (because also windows is affected, and i currently no longer have a easy way to test, without setting up a vm) ^^ Also i dont know if #2457 (#2446) is not fixed by this, because i think they also had trouble opening these files, and |
#2457 was never intended to be merged, i just needed that so a windows guy could test out a theory ^^ it should be closed |
This fixes my issue with a few tweaks
|
I've just rebased this branch, and am actually testing this now for 2 days straight, maybe we can get this merge then afterwards and get it in 0.1.x prior to 0.1.6 btw james i've wrote you on matrix, regarding that release :) |
Also also maybe we can see if we need @AvarianKnight remarks in Avarian do you use windows? if yes maybe you could test the branch with the paths mentioned in this issue: #2446 |
On Windows this is still broken, Live Grep shows nothing and opening the file results it opening the wrong path In In
After doing these two thing every seems to work fine (though I applied conditional path expands in a few other areas trying to find where the issue was, so this could also be from that) |
Let me look into this some more. This is actually at least my second attempt trying to use less Main issue is stemming from the fact that people can pass non-absolute paths to the If we abandon the goal of porting this fix to telescope 0.1.x, we can use |
yeah lets leave this out, we can always just do multiple releases back to back :D i would personally prefer a solution also for 0.1.x and a solution that doesnt require plenary.path because we kinda wanna move away from that see #2552 😆 Also also i am not sure how stable plenary |
I went with the lazy approach of just borrowing the existing I'll do some testing on this branch over the next few days. |
I'm going to let this fly. |
(cherry picked from commit 3b8399c)
There's a few areas where I believe we're over expanding paths.
We've done some quick fixes with
vim.fn.escape
here and there but I want to explore rather than escaping certain characters then expanding, only expanding when the provided "path" is worth expanding (starts with either '%', '#' or '<').The places where I'm made changes, it should be safe to assume that at that point, a $ in a path mean the literal $ rather than some shell variable and I'm not even sure if they even ever need expanding.Edit: ^ this should largely not be a concern anymore. Unlike with
vim.fn.escape
,vim.fs.normalize
only expands$
if it's actually a shell variable.closes nvim-telescope/telescope-file-browser.nvim#289
also relevant:
#2457