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

Request #14753 add_list_option parameter for --list-XXX options
Submitted: 2008-10-06 17:15 UTC
From: cweiske Assigned: izi
Status: Closed Package: Console_CommandLine (version 1.0.3)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 48 - 21 = ?

 
 [2008-10-06 17:15 UTC] cweiske (Christian Weiske)
Description: ------------ It would be cool to (semi)automatically get an option that lists the choices of another option. E.g. $parser->addOption('language', array( 'short_name' => '-l', 'long_name' => '--language', 'action' => 'StoreString', 'help_name' => 'LANG', 'description' => 'Manual language', 'choices' => array(1, 2, 3), 'default' => 'en' )); should get an option "--list-languages" that just lists the choices for --language, like the error message does: Error: option "language" must be one of the following: "de", "en", "es", "fr", "hu", "ja", "nl", "pl", "ru", "tr" (got "r").

Comments

 [2008-10-09 10:54 UTC] izi (David Jean Louis)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Console_CommandLine