If you use the Zend Framework CLI interface much you probably find yourself expecting tab-completion to work. Well, with this bash completion script it will. Just add the following line to your .bashrc or .bash_profile:
source path/to/zf.bash
Next time you load the terminal, you can type “zf c” and hit TAB twice to see a list of available commands (change, configure and create” or type “zf cr” and hit TAB to have “create” automatically inserted for you. The script works for both action names and provider names (but not for anything past that). Eventually I want the script to dynamically load the available commands (so that it works with custom providers and future versions of ZF without updates) but I couldn’t get that working for this version so I just hard coded them.
There’s also a version that completes commands from the Galahad Framework Extension if you’re testing that out…
Zend Framework CLI Bash Completion Script [1.71 KB]Enjoy!
Additional comments powered by BackType
You can leave a response, or trackback from your own site. Follow any responses to this entry through the RSS 2.0 feed.
Chris Morrell posted: Zend Framework Bash Completion Script http://bit.ly/bQTRxy
This comment was originally posted on Twitter
Sweet! A bash completion script for the basic #zf Zend_Tool commands http://is.gd/aQqBe. /by @inxilpro
This comment was originally posted on Twitter
RT @raphaelstolt: Sweet! A bash completion script for the basic #zf Zend_Tool commands http://is.gd/aQqBe. /by @inxilpro
This comment was originally posted on Twitter
[...] Morell has created a bash completion script for Zend Framework. If you use the Zend Framework CLI interface much you probably find yourself expecting [...]
Zend Framework Bash Completion Script (by Chris Morrell) http://cmorrell.com/web-development/zf/bash-completion-script-751
This comment was originally posted on Twitter
[...] http://cmorrell.com/web-development/zf/bash-completion-script-751 [...]
Zend Framework Bash Completion Script http://bit.ly/a6qTxR
This comment was originally posted on Twitter
Zend Framework Bash Completion Script http://bit.ly/aZwSC8
This comment was originally posted on Twitter
[...] na ciekawy wpis na blogu Chrisa Morella odnośnie podpowiadania komend Zend Framework w środowisku bash. W systemach [...]