From 5ea486b20a9ef4bb81206b02e9d79fa760ab1440 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 29 Oct 2012 01:53:10 -0700 Subject: [PATCH] Fix help completion to not barf if html file is absent --- share/completions/help.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/completions/help.fish b/share/completions/help.fish index 120934889..abf88f3c3 100644 --- a/share/completions/help.fish +++ b/share/completions/help.fish @@ -2,8 +2,10 @@ # Completions for the help command # -for i in case (sed -n < $__fish_help_dir/commands.html -e "s/.*

.*/\1/p") - complete -c help -x -a $i --description "Help for the specified command" +if test -f "$__fish_help_dir/commands.html" + for i in case (sed -n < $__fish_help_dir/commands.html -e "s/.*

.*/\1/p") + complete -c help -x -a $i --description "Help for the specified command" + end end complete -c help -x -a syntax --description 'Introduction to the fish syntax'