Closed delphinus closed 11 months ago
I agree. Path:new()
is too much way for joining paths, for sure.
BTW, vim.fs.joinpath
has two problems. First, it naively uses /
for path, so fails in Windows (maybe). Second, this func is unavailable v0.9.x that telescope.nvim still supports.
I will rewrite by using cwd .. Path.path.sep .. filename
.
Second, this func is unavailable v0.9.x that telescope.nvim still supports.
Great point! Makes the decision easy :)
BTW, vim.fs.joinpath has two problems. First, it naively uses / for path, so fails in Windows (maybe).
Oof. Windows does also support forward slashes generally speaking, but we would have had to jump through more hoops (i.e., setting forward slash in --path-separator
explicitly).
Thanks!
Just incorporated a fix (using entry.path
since filename
otherwise clashes with entry maker when actions.to_fuzzy_refine
is called) and also as a precaution added it to title.
I noticed I cannot open files with
cwd=/path/to/foo/dir
option.Then I select
bar/init.lua
, it tries to open~/bar/init.lua
instead of/path/to/foo/dir/bar/init.lua
.I fixed this with joining
cwd
value and relative path infilename
. Is this a correct way to solve this? How do you think?