fish version 3.1.2
Msys2 has the cygpath command but no cygstart.
This result in cygpath not being called:
|
# 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_page
I can submit a push request if needed.
Edit: I updated the regex from cygstart|cmd\.exe to cygstart|.*cmd\.exe
fish version 3.1.2
Msys2 has the
cygpathcommand but nocygstart.This result in
cygpathnot being called:fish-shell/share/functions/help.fish
Lines 139 to 143 in 27f9920
When no browser are set and since it doesn't find
cygstartit defaults tocmd.exehowever becausecygpathis 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
exitwill return to fish:From my understanding this could be resolved by changing the code quoted above to this:
I can submit a push request if needed.
Edit: I updated the regex from
cygstart|cmd\.exetocygstart|.*cmd\.exe