summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-24 22:36:06 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-24 22:37:28 +0100
commit8f96ebe5df8d4185cb058ecddb939b580a9a8317 (patch)
tree494da274af11e4e37a653210c64b47beb5998885
parent9bcfefed10bb9e48186695b8bea00c8544bcfbb3 (diff)
help: check for argument
-rwxr-xr-xetc/functions/help5
1 files changed, 5 insertions, 0 deletions
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 <command>" > /dev/stderr
+ return 1
+}
+
for method in $methods; {
if help_check_$method $1; then
((found++))