cvs: php4 /pear/scripts pear.in

From: Date: Sun, 19 May 2002 15:50:36 +0000
Subject: cvs: php4 /pear/scripts pear.in
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3934@lists.php.net to get a copy of this message
cox Sun May 19 11:50:36 2002 EDT Modified files: /php4/pear/scripts pear.in Log: Put "pear help options" working again Index: php4/pear/scripts/pear.in diff -u php4/pear/scripts/pear.in:1.48 php4/pear/scripts/pear.in:1.49 --- php4/pear/scripts/pear.in:1.48 Tue May 14 13:58:44 2002 +++ php4/pear/scripts/pear.in Sun May 19 11:50:36 2002 @@ -16,8 +16,10 @@ // +----------------------------------------------------------------------+ // | Authors: Stig Bakken <ssb@fast.no> | // | Tomas V.V.Cox <cox@idecnet.com> | +// | | // +----------------------------------------------------------------------+ // +// $Id: pear.in,v 1.49 2002/05/19 15:50:36 cox Exp $ ini_set('allow_url_fopen', true); set_time_limit(0); @@ -128,14 +130,14 @@ Gtk::main(); } else do { if (empty($all_commands[$command]) || $command == 'help') { - usage(null, @$options[1][2]); + usage(null, @$options[1][0]); } $cmd = PEAR_Command::factory($command, $config); if (PEAR::isError($cmd)) { die($cmd->getMessage()); } - + $short_args = $long_args = null; PEAR_Command::getGetoptArgs($command, $short_args, $long_args); if (PEAR::isError($tmp = Console_Getopt::getopt($options[1], $short_args, $long_args))) { @@ -217,9 +219,9 @@ " -h, -? display help/usage (this message)\n"; } elseif ($help = PEAR_Command::getHelp($command)) { if (is_string($help)) { - return "Usage : $help"; + return "$help\n"; } - return "Usage : $progname $command {$help[0]}\n{$help[1]}"; + return "{$help[0]}\n{$help[1]}"; } return "No such command"; }

« previous php.pear.cvs (#3934) next »