diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-09 18:46:14 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-09 18:46:14 -0700 |
commit | a04f31c5c04cc6768b31bc2867dcb753ba393bc8 (patch) | |
tree | 87808e586b460df6f05a87d15b0fff60cd15b30f /share/functions/help.fish | |
parent | 1d9f47d1e5b9e8985214f9c32320e1cb8337746a (diff) |
make help smarter on OS X (don't show useless builtin man page)
Diffstat (limited to 'share/functions/help.fish')
-rw-r--r-- | share/functions/help.fish | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/share/functions/help.fish b/share/functions/help.fish index 4e7179a3..6d10236a 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -76,7 +76,7 @@ function help --description "Show help for the fish shell" return 1 end - set fish_help_item $argv[1] + set -l fish_help_item $argv[1] switch "$fish_help_item" case "" @@ -98,7 +98,14 @@ function help --description "Show help for the fish shell" set fish_help_page "index.html\#$fish_help_item" case "*" if type -f $fish_help_item >/dev/null - man $fish_help_item + # Prefer to use fish's man pages, to avoid + # the annoying useless "builtin" man page bash + # installs on OS X + set -l man_arg "$__fish_datadir/man/man1/$fish_help_item.1" + if test ! -f "$man_arg" + set man_arg $fish_help_item + end + man $man_arg return end set fish_help_page "index.html" |