From 3a4a2a6daca2e5822b067dffd5a30ec13a37c63e Mon Sep 17 00:00:00 2001 From: "David Adam (zanchey)" Date: Thu, 23 May 2013 12:20:40 +0800 Subject: [PATCH] help command: only use $BROWSER if it is a valid command (plus add Google Chrome and Chromium to graphical_browsers and a spelling fix) --- share/functions/help.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/functions/help.fish b/share/functions/help.fish index d3d229c26..78f936572 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -22,11 +22,11 @@ function help --description 'Show help for the fish shell' # Find a suitable browser for viewing the help pages. This is needed # by the help function defined below. # - set -l graphical_browsers htmlview x-www-browser firefox galeon mozilla konqueror epiphany opera netscape rekonq + set -l graphical_browsers htmlview x-www-browser firefox galeon mozilla konqueror epiphany opera netscape rekonq google-chrome chromium-browser set -l text_browsers htmlview www-browser links elinks lynx w3m - if test $BROWSER - # User has manualy set a preferred browser, so we respect that + if type $BROWSER >/dev/null + # User has manually set a preferred browser, so we respect that set fish_browser $BROWSER # If browser is known to be graphical, put into background