mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
help: Only use open
on macOS
Unfortunately on Debian "open" is a symlink to "openvt", and there's no way from outside to tell. This prevents fish from failing because no browser could be found.
This commit is contained in:
parent
c209e6b5fb
commit
bdfa7341e7
|
@ -57,11 +57,9 @@ function help --description 'Show help for the fish shell'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# If we have an open _command_ we use it - otherwise it's our function,
|
# We use the macOS open, but not otherwise.
|
||||||
# which might not have a backend to use.
|
# On Debian, there is an open command that's a symlink to openvt.
|
||||||
# Note that we prefer xdg-open, because this open might also be a symlink to "openvt"
|
if uname | string match -q Darwin && command -sq open
|
||||||
# like it is on Debian.
|
|
||||||
if command -sq open
|
|
||||||
set fish_browser open
|
set fish_browser open
|
||||||
# The open command needs a trampoline because the macOS version can't handle #-fragments.
|
# The open command needs a trampoline because the macOS version can't handle #-fragments.
|
||||||
set need_trampoline 1
|
set need_trampoline 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user