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

vim.ui.open fails to open the URL that contais equal (=) in WSL #28410

Closed
kyoh86 opened this issue Apr 19, 2024 · 3 comments · Fixed by #28424
Closed

vim.ui.open fails to open the URL that contais equal (=) in WSL #28410

kyoh86 opened this issue Apr 19, 2024 · 3 comments · Fixed by #28424
Labels
bug issues reporting wrong behavior complexity:low Low-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.md platform:wsl
Milestone

Comments

@kyoh86
Copy link

kyoh86 commented Apr 19, 2024

Problem

Calling :lua vim.ui.open('https://example.com/?g='), it opens explorer.exe.

Steps to reproduce

nvim --clean -c 'lua vim.ui.open("https://example.com/?g=")'

Expected behavior

https://example.com/?g= is shown in the default browser.

Neovim version (nvim -v)

NVIM v0.10.0-dev-e1ca7a7
(it also fails at v0.10.0-dev-5371ed3)

Vim (not Nvim) behaves the same?

no

Operating system/version

Linux 5.15.146.1-microsoft-standard-WSL2 / Windows 11

Terminal name/version

wezterm 20240203-110809-5046fc22

$TERM environment variable

xterm-256color

Installation

build from repo

@kyoh86 kyoh86 added the bug issues reporting wrong behavior label Apr 19, 2024
@github-actions github-actions bot added the ui label Apr 19, 2024
@zeertzjq zeertzjq added platform:wsl and removed ui labels Apr 19, 2024
@justinmk
Copy link
Member

explorer.exe is what decides how to handle the given path. What happens if you do this in your WSL terminal?:

 explorer.exe "https://example.com/?g="

We may need to restore use of wslview , or maybe wsl.exe <subcommand> ? See #26947 (comment)

@justinmk justinmk added this to the backlog milestone Apr 19, 2024
@justinmk justinmk added the complexity:low Low-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.md label Apr 19, 2024
@kyoh86
Copy link
Author

kyoh86 commented Apr 20, 2024

explorer.exe "https://example.com/?g="

It does not open web browser but explorer.

I do not know of any solution that does not use wslview.
I don't think replacing the role that wslview does with vim.ui.open is a very good choice...
https://github.com/wslutilities/wslu

@justinmk
Copy link
Member

justinmk commented Apr 20, 2024

I don't think replacing the role that wslview does with vim.ui.open is a very good choice...
https://github.com/wslutilities/wslu

? vim.ui.open could call wslview, it's not "replacing" it.

explorer.exe was used because according to #26947 , wslview may not be installed. We can of course prefer wslview if it is found. Someone just needs to send a PR.

@justinmk justinmk modified the milestones: backlog, 0.10 Apr 20, 2024
justinmk added a commit to justinmk/neovim that referenced this issue Apr 20, 2024
Problem:
explorer.exe is unreliable on WSL.

Solution:
Try wslview before explorer.exe.

fix neovim#28410
justinmk added a commit to justinmk/neovim that referenced this issue Apr 20, 2024
Problem:
explorer.exe is unreliable on WSL.

Solution:
Try wslview before explorer.exe.

fix neovim#28410
justinmk added a commit that referenced this issue Apr 20, 2024
Problem:
explorer.exe is unreliable on WSL.

Solution:
Try wslview before explorer.exe.

fix #28410
RandomChugokujin pushed a commit to RandomChugokujin/neovim that referenced this issue Apr 24, 2024
Problem:
explorer.exe is unreliable on WSL.

Solution:
Try wslview before explorer.exe.

fix neovim#28410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior complexity:low Low-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.md platform:wsl
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants