Console_CommandLine List Action -- seems buggy

From: Date: Thu, 24 Mar 2011 07:43:36 +0000
Subject: Console_CommandLine List Action -- seems buggy
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54177@lists.php.net to get a copy of this message
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. ______________________________________________________

« previous php.pear.dev (#54177) next »