fc365f5bdcb1fe63b4fe3c2e135a9c101e4c5d3a
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #2963 from bezoerb/symfony2-autocomplete-fix
#2914 fixed symfony2 autocomplete
Diff
1diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh
2index 1d5177e6d53276c49381ec6275a79d1d3e80588f..c8c102eeee5334d3a3d1a7ba53309af4e5dd24c5 100644
3--- a/plugins/symfony2/symfony2.plugin.zsh
4+++ b/plugins/symfony2/symfony2.plugin.zsh
5@@ -1,23 +1,24 @@
6 # Symfony2 basic command completion
7
8+_symfony_console () {
9+ echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console')"
10+}
11+
12 _symfony2_get_command_list () {
13- php $(find . -maxdepth 2 -mindepth 1 -name 'console') --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
14+ `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
15 }
16
17 _symfony2 () {
18- if [ -f $(find . -maxdepth 2 -mindepth 1 -name 'console') ]; then
19- compadd `_symfony2_get_command_list`
20- fi
21+ compadd `_symfony2_get_command_list`
22 }
23
24-compdef _symfony2 $(find . -maxdepth 2 -mindepth 1 -name 'console')
25+compdef _symfony2 '`_symfony_console`'
26 compdef _symfony2 sf
27
28 #Alias
29-alias sf='php $(find . -maxdepth 2 -mindepth 1 -name 'console') '
30-alias sfcl='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:clear'
31-alias sfcw='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:warmup'
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-
36+alias sf='`_symfony_console`'
37+alias sfcl='sf cache:clear'
38+alias sfcw='sf cache:warmup'
39+alias sfroute='sf router:debug'
40+alias sfcontainer='sf container:debug'
41+alias sfgb='sf generate:bundle'