mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Symfony 3 directory structure for symfony2 plugin
This commit is contained in:
parent
3913106b2e
commit
1fc1223a16
1 changed files with 21 additions and 8 deletions
|
|
@ -1,21 +1,34 @@
|
||||||
# Symfony2 basic command completion
|
# Symfony2 basic command completion
|
||||||
|
|
||||||
_symfony2_get_command_list () {
|
_symfony2_get_command_list () {
|
||||||
php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
if [ -f bin/console ]; then
|
||||||
|
php bin/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
||||||
|
else
|
||||||
|
php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_symfony2 () {
|
_symfony2 () {
|
||||||
if [ -f app/console ]; then
|
if [[ (-f app/console) || (-f bin/console) ]]; then
|
||||||
compadd `_symfony2_get_command_list`
|
compadd `_symfony2_get_command_list`
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_symfony2_command () {
|
||||||
|
if [ -f bin/console ]; then
|
||||||
|
php bin/console $*
|
||||||
|
else
|
||||||
|
php app/console $*
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
compdef _symfony2 app/console
|
compdef _symfony2 app/console
|
||||||
compdef _symfony2 sf
|
compdef _symfony2 bin/console
|
||||||
|
compdef _symfony2 _symfony2_command
|
||||||
|
|
||||||
#Alias
|
#Alias
|
||||||
alias sf='php app/console'
|
alias sf='_symfony2_command'
|
||||||
alias sfcl='php app/console cache:clear'
|
alias sfcl='_symfony2_command cache:clear'
|
||||||
alias sfroute='php app/console router:debug'
|
alias sfroute='_symfony2_command router:debug'
|
||||||
alias sfgb='php app/console generate:bundle'
|
alias sfgb='_symfony2_command generate:bundle'
|
||||||
|
alias sfcd='_symfony2_command container:debug'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue