mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Support for Symfony3 directory structure
In Symfony 2.5 they introduced the option to have a Symfony3 directory structure with which the current plugin does not work. The new directory structure contains the console command inside the bin/ folder rather than app/.
This commit is contained in:
parent
4131a59d1a
commit
c22b8d61e5
1 changed files with 16 additions and 2 deletions
|
|
@ -4,19 +4,33 @@ _symfony2_get_command_list () {
|
||||||
php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_symfony2_get_command_list_bin () {
|
||||||
|
php bin/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
||||||
|
}
|
||||||
|
|
||||||
_symfony2 () {
|
_symfony2 () {
|
||||||
if [ -f app/console ]; then
|
if [ -f app/console ]; then
|
||||||
compadd `_symfony2_get_command_list`
|
compadd `_symfony2_get_command_list`
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_symfony2_bin () {
|
||||||
|
if [ -f bin/console ]; then
|
||||||
|
compadd `_symfony2_get_command_list_bin`
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
compdef _symfony2 app/console
|
compdef _symfony2 app/console
|
||||||
compdef _symfony2 sf
|
compdef _symfony2 sf
|
||||||
|
|
||||||
|
compdef _symfony2_bin bin/console
|
||||||
|
compdef _symfony2_bin sfb
|
||||||
|
|
||||||
#Alias
|
#Alias
|
||||||
alias sf='php app/console'
|
alias sf='php app/console'
|
||||||
alias sfcl='php app/console cache:clear'
|
alias sfcl='php app/console cache:clear'
|
||||||
alias sfroute='php app/console router:debug'
|
alias sfroute='php app/console router:debug'
|
||||||
alias sfcontainer='php app/console container:debug'
|
|
||||||
alias sfgb='php app/console generate:bundle'
|
|
||||||
|
|
||||||
|
alias sfb='php bin/console'
|
||||||
|
alias sfclb='php bin/console cache:clear'
|
||||||
|
alias sfrouteb='php bin/console router:debug'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue