mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Merge f601a05919 into 3913106b2e
This commit is contained in:
commit
38703d7259
1 changed files with 13 additions and 7 deletions
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue