From 19c946cce206cfec35a94fab27bcfd369f3cf8c8 Mon Sep 17 00:00:00 2001 From: Christian Dickmann Date: Sun, 2 Jun 2002 20:13:50 +0000 Subject: [PATCH] make 'pear search' work with CLI. fix a typo --- pear/PEAR/Command/Remote.php | 2 +- pear/PEAR/Frontend/CLI.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php index 2550236be5..e34b3c768d 100644 --- a/pear/PEAR/Command/Remote.php +++ b/pear/PEAR/Command/Remote.php @@ -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 } // }}} diff --git a/pear/PEAR/Frontend/CLI.php b/pear/PEAR/Frontend/CLI.php index 5032d18b58..d0b029bace 100644 --- a/pear/PEAR/Frontend/CLI.php +++ b/pear/PEAR/Frontend/CLI.php @@ -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'])) -- 2.50.1