-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
fish version 3.1.2
Msys2 has the cygpath command but no cygstart.
This result in cygpath not being called:
fish-shell/share/functions/help.fish
Lines 139 to 143 in 27f9920
| # For Windows (Cygwin and WSL), we need to convert the base help dir to a Windows path before converting it to a file URL | |
| # but only if a Windows browser is being used | |
| if type -q cygpath | |
| and string match -qr cygstart $fish_browser[1] | |
| set page_url file://(cygpath -m $__fish_help_dir)/$fish_help_page |
When no browser are set and since it doesn't find cygstart it defaults to cmd.exe however because cygpath is not called the path is wrong which make this : /c/Windows/System32/cmd.exe /c 'start file:///usr/share/doc/fish/index.html' fail.
Instead of exiting with an error it then returns to cmd, typing exit will return to fish:
From my understanding this could be resolved by changing the code quoted above to this:
if type -q cygpath
and string match -qr 'cygstart|.*cmd\.exe' $fish_browser[1]
set page_url file://(cygpath -m $__fish_help_dir)/$fish_help_pageI can submit a push request if needed.
Edit: I updated the regex from cygstart|cmd\.exe to cygstart|.*cmd\.exe
Reactions are currently unavailable
