8c74d80fd6cdc7e1b48e7eb321a3e3a22674c3be

Author
hacfi <philipp.wahala@gmail.com>
Committer
hacfi <philipp.wahala@gmail.com>
Date

Message

Fix Symfony2 command completion 'permission denied'

app/console by default (if you create a new Symfony project via composer create-project or by downloading it from symfony.com) is not executable. Therefore I get the following error:

sf2 _symfony2_get_command_list:1: permission denied: app/console 
_symfony2_get_command_list:1: permission denied: app/console
_symfony2_get_command_list:1: permission denied: app/console

To make command completion work without changing app/console you just have to let php run it.

Diff

 1diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh
 2index cc9ffebc00c21c63eec916542585d4998a9a2ba1..f425c14f77c100143a0c835a58bb4f6d71583ca3 100644
 3--- a/plugins/symfony2/symfony2.plugin.zsh
 4+++ b/plugins/symfony2/symfony2.plugin.zsh
 5@@ -1,7 +1,7 @@
 6 # Symfony2 basic command completion
 7 
 8 _symfony2_get_command_list () {
 9-	app/console --no-ansi | sed "1,/Available commands/d" | awk '/^  [a-z]+/ { print $1 }'
10+	php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^  [a-z]+/ { print $1 }'
11 }
12 
13 _symfony2 () {