Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.2

Bug #16329 sub command aliases do not work.
Submitted: 2009-06-15 20:08 UTC
From: rquadling Assigned: izi
Status: Closed Package: Console_CommandLine (version 1.0.6)
PHP Version: 5_3 CVS-2009-06-15 OS: Windows XP SP3
Roadmaps: (Not assigned)    
Subscription  


 [2009-06-15 20:08 UTC] rquadling (Richard Quadling)
Description: ------------ Aliases for sub commands do not work. The "Expected" result below is generated from using: test.php update The "Actual" result below is generated from using: test.php up In looking through the source, there is no mention of the word "alias". This documentation (http://pear.php.net/manual/en/package.console.console- commandline.sub-commands.php) is where I've come from in trying to use aliases. Test script: --------------- <?php require_once 'Console/CommandLine.php'; $o_Parser = new Console_CommandLine(); $o_Parser->addCommand ( 'update', array ( 'description' => 'Update the given package', 'aliases' => array('up'), // we can have more than 1 alias ) ); print_r($o_Parser->parse()); Expected result: ---------------- Console_CommandLine_Result Object ( [options] => Array ( [help] => ) [args] => Array ( ) [command_name] => update [command] => Console_CommandLine_Result Object ( [options] => Array ( [help] => ) [args] => Array ( ) [command_name] => [command] => ) ) Actual result: -------------- Console_CommandLine_Result Object ( [options] => Array ( [help] => ) [args] => Array ( ) [command_name] => [command] => )

Comments

 [2009-06-15 21:17 UTC] izi (David Jean Louis)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: izi
Sub-command aliases are implemented in the CVS version only, the pear manual has been updated on sunday, I thought I would have time to release before sunday, but I didn't. They will be available on the next release, hopefully this week.
 [2009-06-19 16:40 UTC] izi (David Jean Louis)
-Status: Assigned +Status: Closed
1.0.7 released, now subcommand alias should work ;)