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)    

 [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").


 [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