A long time ago (a year and a half, I just checked) my good friend Jesper Rasmussen blogged about zsh, a shell that he had been ranting about for at least a year. About a year later I shifted to it as well, and soon thereafter I began using the setup from Oh My Zsh. It has some great plugins, of which I use the git support every day.
A couple of weeks ago I decided to create a plugin of my own, since there was no autocomplete support for phing, which I also use every day. (And I love saving a couple of keystrokes whenever I build or deploy).
Creating these auto complete plugins for oh my zsh is rather simple. In my case I have assumed that the build file is allways called build.xml. This way I can get all the targets of the default file with just the command "phing -l". The output of this command is then saved in a temp-file which is used to autocomplete the phing command.
The only problem with this approach is that the "phing -l" command lists some data we cannot use. This is filtered out with grep, before the output is sent to the file. The complete command is:
phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" > .phing_targets
Please contact me if you have feedback, bugfixes, ideas, feature requests or anything else.
