aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/help.fish
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-03-14 10:21:27 +1000
committerGravatar axel <axel@liljencrantz.se>2006-03-14 10:21:27 +1000
commitd58b9de63b7ac368ae67ab879c9a62df9ad46675 (patch)
treef87fb90559084b5b2fad4e03ad0569ebdc1e9cc7 /share/functions/help.fish
parent99a93b5add6ce77b619f8b72499dc58a91024522 (diff)
Use 'type -f' instead of 'which' to test for presense of command, since the latter does not set the exit status correctly on all platforms
darcs-hash:20060314002127-ac50b-6ed726bdcc9e3a7a9608a904c382973799dc73ef.gz
Diffstat (limited to 'share/functions/help.fish')
-rw-r--r--share/functions/help.fish6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/functions/help.fish b/share/functions/help.fish
index ae5aa0a4..5707f4f2 100644
--- a/share/functions/help.fish
+++ b/share/functions/help.fish
@@ -36,7 +36,7 @@ function help -d (N_ "Show help for the fish shell")
else
# Check for a text-based browser.
for i in $text_browsers
- if which $i 2>/dev/null >/dev/null
+ if type -f $i >/dev/null
set fish_browser $i
break
end
@@ -46,7 +46,7 @@ function help -d (N_ "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 which $i 2>/dev/null >/dev/null
+ if type -f $i >/dev/null
set fish_browser $i
set fish_browser_bg 1
break
@@ -79,7 +79,7 @@ function help -d (N_ "Show help for the fish shell")
case $help_topics
set fish_help_page "index.html\#$fish_help_item"
case "*"
- if which $fish_help_item >/dev/null ^/dev/null
+ if type -f $fish_help_item >/dev/null
man $fish_help_item
return
end