views:

198

answers:

2

How can I make symfony completion in bash? Have ubuntu 9.10. It's hard to write own alias. Anyone know where can I find it?

I find http://trac.symfony-project.org/wiki/BashCompletion - but it is for symfony 1.1. Is it compatible with 1.4 ?

A: 

I am not sure if that code will work with 1.4 because I do not use propel but use the doctrine ORM with symfony. However is there a real need to do this any more? The symfony task is capable of working out what you meant if it is the most unique form of the expression much like completion would work, for example:

./symfony do:build --all --and-load --no-confirmation

I also find it useful to put scripts like the above if you use them a lot into their own bash scripts in the path so you can call them with code completion i.e.

#!/bin/bash
./symfony doctrine:build --all --and-load --no-confirmation

and then save it in the path e.g. /usr/local/sbin as something like symfony-build then set it as execucutable chmod +x /usr/local/sbin/symfony-build then you may call it by typing symfony-[TAB] and it should code complete for you (though not necessarily how you wanted).

plod
+2  A: 

http://github.com/biko2/symfony_complete

This script works great for symfony 1.4.

tonio
hey nice find :)
plod