mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 08:56:43 +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
|
||||
|
||||
# If we have an open _command_ we use it - otherwise it's our function,
|
||||
# which might not have a backend to use.
|
||||
# Note that we prefer xdg-open, because this open might also be a symlink to "openvt"
|
||||
# like it is on Debian.
|
||||
if command -sq open
|
||||
# We use the macOS open, but not otherwise.
|
||||
# On Debian, there is an open command that's a symlink to openvt.
|
||||
if uname | string match -q Darwin && command -sq open
|
||||
set fish_browser open
|
||||
# The open command needs a trampoline because the macOS version can't handle #-fragments.
|
||||
set need_trampoline 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user