aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/help.fish
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-07-10 00:26:58 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-07-13 19:11:29 -0700
commit533496e43ac4de68537b66412d54e880e03b6561 (patch)
treeed6bf5c69595aa0385ce8307d542feaae91e8c1b /share/functions/help.fish
parent6f7a7459c1dadc88e793b558d5ce2668359e7bea (diff)
Adopt the new type -q flag in the other functions
Diffstat (limited to 'share/functions/help.fish')
-rw-r--r--share/functions/help.fish14
1 files changed, 7 insertions, 7 deletions
diff --git a/share/functions/help.fish b/share/functions/help.fish
index 04992e35..a04add53 100644
--- a/share/functions/help.fish
+++ b/share/functions/help.fish
@@ -25,7 +25,7 @@ function help --description 'Show help for the fish shell'
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 type "$BROWSER" >/dev/null
+ if type -q "$BROWSER"
# User has manually set a preferred browser, so we respect that
set fish_browser $BROWSER
@@ -36,7 +36,7 @@ function help --description 'Show help for the fish shell'
else
# Check for a text-based browser.
for i in $text_browsers
- if type -f $i >/dev/null
+ if type -q -f $i
set fish_browser $i
break
end
@@ -46,7 +46,7 @@ function help --description 'Show help for the fish shell'
# browser to use instead.
if test "$DISPLAY" -a \( "$XAUTHORITY" = "$HOME/.Xauthority" -o "$XAUTHORITY" = "" \)
for i in $graphical_browsers
- if type -f $i >/dev/null
+ if type -q -f $i
set fish_browser $i
set fish_browser_bg 1
break
@@ -55,17 +55,17 @@ function help --description 'Show help for the fish shell'
end
# If the OS appears to be Windows (graphical), try to use cygstart
- if type cygstart > /dev/null
+ if type -q cygstart
set fish_browser cygstart
# If xdg-open is available, just use that
- else if type xdg-open > /dev/null
+ else if type -q xdg-open
set fish_browser xdg-open
end
# On OS X, we go through osascript by default
if test (uname) = Darwin
- if type osascript >/dev/null
+ if type -q osascript
set fish_browser osascript
end
end
@@ -92,7 +92,7 @@ function help --description 'Show help for the fish shell'
case $help_topics
set fish_help_page "index.html\#$fish_help_item"
case "*"
- if type -f $fish_help_item >/dev/null
+ if type -q -f $fish_help_item
# Prefer to use fish's man pages, to avoid
# the annoying useless "builtin" man page bash
# installs on OS X