]> granicus.if.org Git - php/commitdiff
Be nicer with the help
authorTomas V.V.Cox <cox@php.net>
Fri, 7 Jun 2002 08:05:48 +0000 (08:05 +0000)
committerTomas V.V.Cox <cox@php.net>
Fri, 7 Jun 2002 08:05:48 +0000 (08:05 +0000)
pear/scripts/pear.in

index c16b475635669c4f514a2679d0cbd951d2642b39..cd81aa0a40dfeddf4dbd2019a9fe01bd020ad967 100644 (file)
@@ -242,9 +242,13 @@ function cmdHelp($command)
 
     } elseif ($help = PEAR_Command::getHelp($command)) {
         if (is_string($help)) {
-            return "pear $command [options] $help\n";
+            return "$progname $command [options] $help\n";
+        }
+        if ($help[1] === null) {
+            return "$progname $command $help[0]";
+        } else {
+            return "$progname $command [options] $help[0]\n$help[1]";
         }
-        return "pear $command [options] $help[0]\n$help[1]";
     }
     return "No such command";
 }