News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zumba Engineering Blog:
Creating bash completion to your console application
August 21, 2012 @ 09:47:52

On the Zumba Engineering blog there's a new post showing you how to implement bash shell "autocomplete" with a special option for a second argument.

This weekend I saw the bash completion for CakePHP from Andy Dawson and had an idea to do the same for our service application, because we frequently forget the exactly job class or method name and add extra steps to verify these names before execute the job. I read his code, made some research and finally get our bash completion working fine.

In his case he wanted to see what things a module in the application had to offer, so he implemented a "__check__" argument that looked at the third argument and used reflection to get the methods allowed for it. Also included in the post is the bash alias you'll need to set up to get it working (and where to put it to make it cooperate).

0 comments voice your opinion now!
bash autocomplete console tutorial reflection


blog comments powered by Disqus

Similar Posts

PHPToys.com: Creating a file based AD rotator script

Piotr Walczyszyn's Blog: Configuring Eclipse PDT & Flash Builder 4 Plug-in for PHP/Flex development

Volker Dusch's Blog: Textual code coverage information for PHPUnit

Windows IIS Blog: Debugging WINCACHE on Windows using Visual Studio - Basic

PHPBuilder.com: Upgrading Basic Twitter Authentication to OAuth with PHP


Community Events





Don't see your event here?
Let us know!


api release deployment community language series voicesoftheelephpant podcast package unittest introduction interview symfony zendserver library bugfix opinion framework laravel install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework