mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
make help smarter on OS X (don't show useless builtin man page)
This commit is contained in:
parent
1d9f47d1e5
commit
a04f31c5c0
@ -76,7 +76,7 @@ function help --description "Show help for the fish shell"
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
set fish_help_item $argv[1]
|
set -l fish_help_item $argv[1]
|
||||||
|
|
||||||
switch "$fish_help_item"
|
switch "$fish_help_item"
|
||||||
case ""
|
case ""
|
||||||
@ -98,7 +98,14 @@ function help --description "Show help for the fish shell"
|
|||||||
set fish_help_page "index.html\#$fish_help_item"
|
set fish_help_page "index.html\#$fish_help_item"
|
||||||
case "*"
|
case "*"
|
||||||
if type -f $fish_help_item >/dev/null
|
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
|
return
|
||||||
end
|
end
|
||||||
set fish_help_page "index.html"
|
set fish_help_page "index.html"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user