chrishrb / gx.nvim

Implementation of gx without the need of netrw
Apache License 2.0
186 stars 19 forks source link

Add support for windows. #18

Closed Chemiseblanc closed 1 year ago

Chemiseblanc commented 1 year ago

Normally explorer.exe always returns 1 since the built-in variable ERRORLEVEL is used for error checking. To correct this into the expected return code behavior the process is started through PowerShell.

chrishrb commented 1 year ago

Thank you for this PR! I refactored the code a bit and added support for windows in the README.

One question: Does this work also in the WSL? I can‘t try it out on my own, because i only have a Mac with a Windows VM and WSL is not supported there.

Chemiseblanc commented 1 year ago

WSL looks like it works too. Their implementation xdg-open seems to forward things to the correct windows application.

chrishrb commented 1 year ago

thanks for testing! Then I will now merge this PR 👍