From 29cd62ab6e05eb5de871b36eb2a0d3277507f255 Mon Sep 17 00:00:00 2001 From: axel Date: Mon, 29 May 2006 23:32:39 +1000 Subject: [PATCH] Check documentation for listing of external commands instead of relying on out of date static lists in various places darcs-hash:20060529133239-ac50b-48392cfa1e5817ed8df452f0632658af7fe47a28.gz --- share/completions/help.fish | 2 +- share/functions/help.fish | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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"