Skip to content

msys2 bruteforce path support #663

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shikorido
Copy link

@shikorido shikorido commented Jul 8, 2025

Verbose changes in path.lua module to be sure that the path will be in windows-style
but due to possible skips of the Path module we can get posix-style path in job.lua module as well.

In my case I get stable Windows-style paths with backslashes (+correctly working relative paths) in harpoon menu.
The changes allow me to use git-related functions from Telescope but it also needs to be changed a bit cause it invokes vim.loop.spawn() directly that leads to posix-style paths in the final command which WinAPI rejects.

The changes are experimental cause integration with msys2 is fragile.
Because of that I left all the comments and test notifies.

… in windows-style

but due to possible skips of the Path module we can get posix-style path in 'job.lua' module as well.

In my case I get stable Windows-style paths in 'harpoon' menu (no mixed slashes).
The changes allow me to use git-related functions from Telescope but it
also needs to be changed a bit cause it invokes 'vim.loop.spawn()' directly
that leads to posix-style paths in the final command which WinAPI rejects.

The changes are experimental cause integration with msys2 is fragile.
shikorido added a commit to shikorido/telescope.nvim that referenced this pull request Jul 8, 2025
The patch assumes that `plenary.nvim` has the changes I made
[in the corresponded PR](nvim-lua/plenary.nvim#663). At least for `plenary.utils` module usage
and bruteforce paths conversions in internal logic.

As stated in the `plenary`'s PR the msys2 integration is very fragile
so I left all my comments and test notifies for further debugging.
@shikorido shikorido force-pushed the msys2-bruteforce-path-support branch 4 times, most recently from 6cb3f6a to 757818d Compare July 8, 2025 22:28
shikorido added a commit to shikorido/telescope.nvim that referenced this pull request Jul 8, 2025
The patch assumes that `plenary.nvim` has the changes I made
[in the corresponded PR](nvim-lua/plenary.nvim#663). At least for `plenary.utils` module usage
and bruteforce paths conversions in internal logic.

As stated in the `plenary`'s PR the msys2 integration is very fragile
so I left all my comments and test notifies for further debugging.
@shikorido shikorido force-pushed the msys2-bruteforce-path-support branch from 757818d to 00e5b4e Compare July 9, 2025 09:30
Using the same approach we can further refactor it focusing on drive
paths conversion first and fallback to msys2 root mapping.
@shikorido shikorido force-pushed the msys2-bruteforce-path-support branch 2 times, most recently from 20f5538 to 43e4e02 Compare July 27, 2025 20:35
@shikorido shikorido force-pushed the msys2-bruteforce-path-support branch from 43e4e02 to a03a47c Compare July 27, 2025 20:37
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

Successfully merging this pull request may close these issues.

1 participant