mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:22:52 +08:00
Fix help thinking some docs are commands
This looked at __fish_print_commands, which goes via our man pages to find the commands (it shouldn't, buuut), and exludes a hard-coded list of pages. So we do two thigns: 1. We add the other doc pages to the list 2. We check commands *later* - if we listed something explicitly it should be used
This commit is contained in:
parent
c964edcd68
commit
5ecdcebf8d
|
@ -3,7 +3,7 @@ function __fish_print_commands --description "Print a list of documented fish co
|
|||
for file in $__fish_data_dir/man/man1/**.1*
|
||||
string replace -r '.*/' '' -- $file |
|
||||
string replace -r '.1(.gz)?$' '' |
|
||||
string match -rv '^fish-(?:completions|doc|tutorial|faq)$'
|
||||
string match -rv '^fish-(?:changelog|completions|doc|tutorial|faq|for-bash-users|interactive|language|releasenotes)$'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -128,11 +128,6 @@ function help --description 'Show help for the fish shell'
|
|||
set fish_help_page "cmds/source.html"
|
||||
case globbing
|
||||
set fish_help_page "language.html#expand"
|
||||
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"
|
||||
case 'tut-*'
|
||||
|
@ -159,6 +154,11 @@ function help --description 'Show help for the fish shell'
|
|||
set fish_help_page "interactive.html#$fish_help_item"
|
||||
case $tutpages
|
||||
set fish_help_page "tutorial.html#$fish_help_item"
|
||||
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 ''
|
||||
set fish_help_page "index.html"
|
||||
case "*"
|
||||
|
|
Loading…
Reference in New Issue
Block a user