mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:05:39 +08:00
help: Better handle builtins when docs aren't installed
__fish_print_commands just prints the commands we have man pages for, and help uses that to figure out whether it should link a command or a section. If the docs aren't installed it won't find anything. At least check the builtins, because we document them and it's easy. This probably needs to be added at build time - glob doc_src/cmds/*.rst.
This commit is contained in:
parent
b70600e070
commit
2a9edfe26e
|
@ -117,7 +117,10 @@ function help --description 'Show help for the fish shell'
|
|||
set fish_help_page "cmds/source.html"
|
||||
case globbing
|
||||
set fish_help_page "index.html#expand"
|
||||
case (__fish_print_commands)
|
||||
case (builtin -n) (__fish_print_commands)
|
||||
# If the docs aren't installed, __fish_print_commands won't print anything
|
||||
# Since we document all our builtins, check those at least.
|
||||
# The alternative is to create this list at build time.
|
||||
set fish_help_page "cmds/$fish_help_item.html"
|
||||
case 'completion-*'
|
||||
set fish_help_page "completions.html#$fish_help_item"
|
||||
|
|
Loading…
Reference in New Issue
Block a user