14ebcc83bec267859e2948f36f48cc69f5150def

Author
Ben Zörb <ben@sommerlaune.com>
Committer
Ben Zörb <ben@sommerlaune.com>
Date

Message

#2893 generalized symfony2 console directory

Diff

 1diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh
 2index 4c07349a4d909f1edbb916b883b733e2be560adf..26210acfd05eeed33a0580c6e2f85580d9ceeef0 100644
 3--- a/plugins/symfony2/symfony2.plugin.zsh
 4+++ b/plugins/symfony2/symfony2.plugin.zsh
 5@@ -1,22 +1,22 @@
 6 # Symfony2 basic command completion
 7 
 8 _symfony2_get_command_list () {
 9-	php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^  [a-z]+/ { print $1 }'
10+	php $(find . -maxdepth 2 -mindepth 1 -name 'console')  --no-ansi | sed "1,/Available commands/d" | awk '/^  [a-z]+/ { print $1 }'
11 }
12 
13 _symfony2 () {
14-  if [ -f app/console ]; then
15+  if [ -f $(find . -maxdepth 2 -mindepth 1 -name 'console')  ]; then
16     compadd `_symfony2_get_command_list`
17   fi
18 }
19 
20-compdef _symfony2 app/console
21+compdef _symfony2 $(find . -maxdepth 2 -mindepth 1 -name 'console')
22 compdef _symfony2 sf
23 
24 #Alias
25-alias sf='php app/console'
26-alias sfcl='php app/console cache:clear'
27-alias sfroute='php app/console router:debug'
28-alias sfcontainer='php app/console container:debug'
29-alias sfgb='php app/console generate:bundle'
30+alias sf='php $(find . -maxdepth 2 -mindepth 1 -name 'console') '
31+alias sfcl='php $(find . -maxdepth 2 -mindepth 1 -name 'console')  cache:clear'
32+alias sfroute='php $(find . -maxdepth 2 -mindepth 1 -name 'console')  router:debug'
33+alias sfcontainer='php $(find . -maxdepth 2 -mindepth 1 -name 'console') container:debug'
34+alias sfgb='php $(find . -maxdepth 2 -mindepth 1 -name 'console')  generate:bundle'
35