Skip to content
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

Windows paths fail if 'shellslash' is set #254

Open
sakhnik opened this issue Oct 12, 2021 · 1 comment
Open

Windows paths fail if 'shellslash' is set #254

sakhnik opened this issue Oct 12, 2021 · 1 comment

Comments

@sakhnik
Copy link

sakhnik commented Oct 12, 2021

When I define 'shellslash', Windows paths look like C:/Users/user/.... This results in multiple failures starting from incorrect path.sep detected, leading to errors like:

E5108: Error executing lua ...a/site/pack/paqs/start/plenary.nvim/lua/plenary/path.lua:490: Could not create file: C:\Users\user\C:/Users/user/AppData/Local/nvim-data/telescope_history
@tajtiattila
Copy link

tajtiattila commented Nov 28, 2022

I'm a long-time Vim user and recently switched to Neovim. I tried telescope with the shellslash option enabled, but it didn't work because of this bug in plenary.path. Telescope fails early and doesn't seem to be able to open the UI.

I tried the commit 5f70cf1 from @andreadev-it from his PR #371, and worked better: the Telescope UI is shown but fails on close or exit when saving the history.

The problem is that Windows accepts both '/' and '\' as path separators, and plenary.path doesn't take this into account.

Functions such as root, is_absolute, _split_by_separator, clean etc. must be updated to make it work.

I took andreadev-it/plenary.nvim and applied the changes aforementioned changes, and this fixed the issues in Telescope for me, see ba5e017.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants