From 21c8be8cd1a2c430c53740eabf2f689841b76cdd Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 22 Mar 2019 09:09:16 +0100 Subject: [PATCH] functions/help: Use open command everywhere See #5756. [ci skip] --- share/functions/help.fish | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/share/functions/help.fish b/share/functions/help.fish index e42ad81b7..d1e724377 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -65,12 +65,11 @@ function help --description 'Show help for the fish shell' set fish_browser xdg-open end - # On OS X, we go through open by default - if test (uname) = Darwin - if type -q open - set fish_browser open - set need_trampoline 1 - end + # If we have an open _command_ we use it - otherwise it's our function, + # which might not have a backend to use. + if command -sq open + set fish_browser open + set need_trampoline 1 end end end