aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/help.fish
diff options
context:
space:
mode:
authorGravatar David Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>2012-12-19 09:58:10 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-26 21:09:50 -0800
commit27e4ece24f0913e561ad7cddc2ff91dc1ce6be30 (patch)
tree37e995e30bb0c8039ba727a7c3989e86e5cb5ba1 /share/completions/help.fish
parentfc898eff65a19f6e0869a189e405a7bc8b44ac7e (diff)
add __fish_print_commands and use it for help
Diffstat (limited to 'share/completions/help.fish')
-rw-r--r--share/completions/help.fish6
1 files changed, 2 insertions, 4 deletions
diff --git a/share/completions/help.fish b/share/completions/help.fish
index d96745ab..f0c1fa0a 100644
--- a/share/completions/help.fish
+++ b/share/completions/help.fish
@@ -2,10 +2,8 @@
# Completions for the help command
#
-if test -f "$__fish_help_dir/commands.html"
- for i in case (sed -n < $__fish_help_dir/commands.html -e "s/.*<h[12]><a class=\"anchor\" name=\"\([^\"]*\)\">.*/\1/p")
- complete -c help -x -a $i --description "Help for the specified command"
- end
+if test -d "$__fish_datadir/man/man1/"
+ complete -c help -x -a '(__fish_print_commands)' --description "Help for this command"
end
complete -c help -x -a syntax --description 'Introduction to the fish syntax'