From 8f96ebe5df8d4185cb058ecddb939b580a9a8317 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 24 Mar 2009 22:36:06 +0100 Subject: help: check for argument --- etc/functions/help | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc/functions') diff --git a/etc/functions/help b/etc/functions/help index 62278a8..7f5e35b 100755 --- a/etc/functions/help +++ b/etc/functions/help @@ -29,6 +29,11 @@ function help_show_apt { apt-cache show ${(s/:/)$(apt-file search -F $commands[$1])[1]} } +if [[ -z $1 ]] { + echo "Usage: help " > /dev/stderr + return 1 +} + for method in $methods; { if help_check_$method $1; then ((found++)) -- cgit v1.2.3