help.fish: only use cmd.exe on WSL

Fixes #6797
This commit is contained in:
Johannes Altmanninger 2020-03-23 20:57:23 +01:00
parent 1547a22659
commit d0bedf3bbd

View File

@ -85,7 +85,8 @@ function help --description 'Show help for the fish shell'
#
# We use this instead of xdg-open because that's useless without a backend
# like wsl-open which we'll check in a minute.
if not type -q cygstart
if test -f /proc/version
and string match -riq 'Microsoft|WSL' </proc/version
and set -l cmd (command -s cmd.exe /mnt/c/Windows/System32/cmd.exe)
# Use the first of these.
set fish_browser $cmd[1]