summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas V.V.Cox <cox@php.net>2002-06-07 08:05:48 +0000
committerTomas V.V.Cox <cox@php.net>2002-06-07 08:05:48 +0000
commit149dcec76f799d15e5f41c4c648962d40ca26b19 (patch)
tree678457009ad466d9bdea4a4911369d80f7a0586a
parent7770b625ba1039a00f2e8a70ddbe3da0b8fd4ddd (diff)
downloadphp-git-149dcec76f799d15e5f41c4c648962d40ca26b19.tar.gz
Be nicer with the help
-rw-r--r--pear/scripts/pear.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in
index c16b475635..cd81aa0a40 100644
--- a/pear/scripts/pear.in
+++ b/pear/scripts/pear.in
@@ -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";
}