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

Open files in wsl from windows context menu #2506

Closed
WillScarlettOhara opened this issue Apr 25, 2024 · 4 comments · Fixed by #2507
Closed

Open files in wsl from windows context menu #2506

WillScarlettOhara opened this issue Apr 25, 2024 · 4 comments · Fixed by #2507
Labels
enhancement New feature or request

Comments

@WillScarlettOhara
Copy link

WillScarlettOhara commented Apr 25, 2024

Is your feature request related to a problem? Please describe.
I can't find a way to open in wsl a Windows file with context menu.

Describe alternatives you've considered
I tried this key C:\Program Files\Neovide\neovide.exe --wsl "%1" in \HKEY_CLASSES_ROOT\*\shell\Neovide\command
My wsl neovim opens at the right place but the file won't open.

Additional context
Example trying to open LICENSE.electron.txt from context menu.
image
image

Comments
For the time being, I don't use Neovide, although I'd like to, because my context menu thing works with wsltty and this registry key :
C:\Users\leilu\AppData\Local\wsltty\bin\mintty.exe --WSL="Ubuntu" --configdir="C:\Users\leilu\AppData\Roaming\wsltty" -t "%1" -e bash --login -c "nvim \"$(wslpath '%1')\""

Btw, the command line reference section might lacks some details about wsl. It took me a while to realize that I'd have to exec wsl --set-default Ubuntu for neovide --wsl to work ;)

@WillScarlettOhara WillScarlettOhara added the enhancement New feature or request label Apr 25, 2024
@fredizzimo
Copy link
Member

I believe this was just recently fixed by:

So, I think it should work if you build the latest from source.

@WillScarlettOhara
Copy link
Author

C:\Program Files\Neovide\neovide.exe --wsl "%1" is working with latest build from source. Thank you.
Now I have to find a way to make it work with files and paths with space(s). Anything in Program Files\ won't open.

@fredizzimo
Copy link
Member

#2507 should deal with spaces and relative paths correctly.

@WillScarlettOhara
Copy link
Author

Thank you

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

Successfully merging a pull request may close this issue.

2 participants