Re: Re: Console_CommandLine List Action -- seems buggy

From: Date: Thu, 24 Mar 2011 19:58:42 +0000
Subject: Re: Re: Console_CommandLine List Action -- seems buggy
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54179@lists.php.net to get a copy of this message
Thanks Laurent, I'll fix this ASAP in peardoc. -- David Le 24/03/2011 19:28, Laurent Laville a écrit : > 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. >> ______________________________________________________ > >

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