From ed6c2c9106cdaf570da6f7a260c41ca1c4b4ed2a Mon Sep 17 00:00:00 2001 From: Philipp Wahala Date: Wed, 3 Sep 2014 11:13:21 +0200 Subject: [PATCH 1/3] Symfony2 plugin use first console found --- plugins/symfony2/symfony2.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index c8c102eee..fcb811fa5 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,7 +1,7 @@ # Symfony2 basic command completion _symfony_console () { - echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console')" + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' | head -n 1)" } _symfony2_get_command_list () { From 677d8b1a21c4b1d8cffef4cbfa259797a11f338a Mon Sep 17 00:00:00 2001 From: Philipp Wahala Date: Wed, 3 Sep 2014 11:36:22 +0200 Subject: [PATCH 2/3] Symfony2 plugin look for files only --- plugins/symfony2/symfony2.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index fcb811fa5..2783cd387 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,7 +1,7 @@ # Symfony2 basic command completion _symfony_console () { - echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' | head -n 1)" + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" } _symfony2_get_command_list () { From 8d2dd8cc6a530e79ffdf307d444cb15430004efa Mon Sep 17 00:00:00 2001 From: Philipp Wahala Date: Wed, 3 Sep 2014 11:58:52 +0200 Subject: [PATCH 3/3] Symfony2 plugin autocomplete for app/console and bin/console --- plugins/symfony2/symfony2.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 2783cd387..8df22e9ad 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -13,6 +13,8 @@ _symfony2 () { } compdef _symfony2 '`_symfony_console`' +compdef _symfony2 'app/console' +compdef _symfony2 'bin/console' compdef _symfony2 sf #Alias