make 'pear search' work with CLI. fix a typo

This commit is contained in:
Christian Dickmann 2002-06-02 20:13:50 +00:00
parent b04656ad40
commit 19c946cce2
2 changed files with 13 additions and 1 deletions

View File

@ -135,7 +135,7 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
$this->ui->outputData($info, $command);
return false; // coming soon
return true; // coming soon
}
// }}}

View File

@ -355,6 +355,18 @@ class PEAR_Frontend_CLI extends PEAR
{
switch ($command)
{
case 'search':
$this->_startTable($data);
if (isset($data['headline']) && is_array($data['headline']))
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
foreach($data['data'] as $category) {
foreach($category as $pkg) {
$this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
}
};
$this->_endTable();
break;
case 'list-all':
$this->_startTable($data);
if (isset($data['headline']) && is_array($data['headline']))