From: Tomas V.V.Cox Date: Fri, 7 Jun 2002 08:05:48 +0000 (+0000) Subject: Be nicer with the help X-Git-Tag: php5_5_0~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=149dcec76f799d15e5f41c4c648962d40ca26b19;p=php Be nicer with the help --- 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"; }