diff --git a/share/completions/help.fish b/share/completions/help.fish index cc2921ca2..de62a55c8 100644 --- a/share/completions/help.fish +++ b/share/completions/help.fish @@ -6,7 +6,7 @@ for i in (builtin -n) complete -c help -x -a $i -d (N_ "Help for the specified builtin") end -for i in count dirh dirs help mimedb nextd open popd prevd pushd set_color psub umask type +for i in case (sed -n < /usr/share/doc/fish-1.21.7/commands.html -e "s/.*

.*/\1/p") complete -c help -x -a $i -d (N_ "Help for the specified command") end diff --git a/share/functions/help.fish b/share/functions/help.fish index 5707f4f20..629e241b2 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -74,7 +74,12 @@ function help -d (N_ "Show help for the fish shell") set fish_help_page "index.html\#expand" case (builtin -n) set fish_help_page "builtins.html\#$fish_help_item" - case contains count dirh dirs help mimedb nextd open popd prevd pushd set_color tokenize psub umask type vared + + # This command substitution should locate all commands with + # documentation. It's a bit of a hack, since it relies on the + # Doxygen markup format to never change... + + case (sed -n < /usr/share/doc/fish-1.21.7/commands.html -e "s/.*

.*/\1/p") set fish_help_page "commands.html\#$fish_help_item" case $help_topics set fish_help_page "index.html\#$fish_help_item"