8000 Cannot call help using msys2 · Issue #7113 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Cannot call help using msys2 #7113

@malobre

Description

@malobre

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:

image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0