Re: Console_CommandLine List Action -- seems buggy
| From: | Laurent Laville | Date: | Thu, 24 Mar 2011 18:28:07 +0000 |
| Subject: | Re: Console_CommandLine List Action -- seems buggy | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54178@lists.php.net to get a copy of this message | ||
I'm confused to ask help while there is a user note on the footer of manual page [1].
In the meantimes, David (izi) gave me the right example offline.
I've opened a bug report [2]. That will avoid to forget it.
Laurent
[1] http://pear.php.net/manual/en/package.console.console-commandline.options.php
[2] https://pear.php.net/bugs/bug.php?id=18397
Le 24/03/2011 08:43, Laurent Laville a écrit :
Hello, I continue to play with Console_CommandLine, but until now I can't use the List Action as it's supposed to run on Manual Page [1]. I've tried to add the "delimiter" => "," after reading the code, but I only get (with or without) Valid choices are: While, if I've well understood, it's supposed to give me Valid choices are: blue, green, yellow Help will be appreciated, if it's not a well know bug. Thanks in advance Laurent [1] http://pear.php.net/manual/en/package.console.console-commandline.options.php ______________________________________________________ List a special action that simply output an array as a list. <?php $parser->addOption('list_colors', array( 'short_name' => '-l', 'long_name' => '--list-colors', 'action' => 'List', 'list' => array('blue', 'green', 'yellow') )); $result = $parser->parse(); ?> $ <yourprogram> --list-colors will display the list of colors separated by commas. ______________________________________________________