From 73f0d0bb488d747c7e6035338e45593a466bfde2 Mon Sep 17 00:00:00 2001 From: axel Date: Tue, 5 Sep 2006 06:16:12 +1000 Subject: [PATCH] Fix warning when help function is called with no arguments darcs-hash:20060904201612-ac50b-63b83a589735021a6afd6be193500b549e3b25dd.gz --- share/functions/help.fish | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/functions/help.fish b/share/functions/help.fish index 02f8cce5a..3919a121d 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -19,9 +19,11 @@ function help -d (N_ "Show help for the fish shell") set -l help_topics $h expand-command-substitution expand-process # 'help -h' should launch 'help help' - switch $argv[1] - case -h --h --he --hel --help - set argv help + if count $argv >/dev/null + switch $argv[1] + case -h --h --he --hel --help + set argv help + end end #