fish-shell/share/functions/__fish_print_commands.fish
Fabian Homborg 5ecdcebf8d 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
2021-11-25 21:25:46 +01:00

9 lines
441 B
Fish

function __fish_print_commands --description "Print a list of documented fish commands"
if test -d $__fish_data_dir/man/man1/
for file in $__fish_data_dir/man/man1/**.1*
string replace -r '.*/' '' -- $file |
string replace -r '.1(.gz)?$' '' |
string match -rv '^fish-(?:changelog|completions|doc|tutorial|faq|for-bash-users|interactive|language|releasenotes)$'
end
end
end