Be nicer with the help

This commit is contained in:
Tomas V.V.Cox 2002-06-07 08:05:48 +00:00
parent 7770b625ba
commit 149dcec76f

View file

@ -242,9 +242,13 @@ function cmdHelp($command)
} elseif ($help = PEAR_Command::getHelp($command)) { } elseif ($help = PEAR_Command::getHelp($command)) {
if (is_string($help)) { 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"; return "No such command";
} }