This commit is contained in:
Ilya Isaev 2014-06-05 08:53:01 +00:00
commit 38703d7259

View file

@ -1,21 +1,27 @@
# Symfony2 basic command completion
if [ -f app/console ]; then
console="app/console"
else
console="bin/console"
fi
_symfony2_get_command_list () {
php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
php $console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
}
_symfony2 () {
if [ -f app/console ]; then
if [ -f $console ]; then
compadd `_symfony2_get_command_list`
fi
}
compdef _symfony2 app/console
compdef _symfony2 $console
compdef _symfony2 sf
#Alias
alias sf='php app/console'
alias sfcl='php app/console cache:clear'
alias sfroute='php app/console router:debug'
alias sfgb='php app/console generate:bundle'
alias sf='php $console'
alias sfcl='php $console cache:clear'
alias sfroute='php $console router:debug'
alias sfgb='php $console generate:bundle'