From 03424fdadba13fea2297a94144e989926cabdcb3 Mon Sep 17 00:00:00 2001 From: Andrew Tch Date: Sun, 18 Dec 2011 00:23:31 +0200 Subject: [PATCH] Symfony 2 completion --- plugins/symfony2/symfony2.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/symfony2/symfony2.plugin.zsh diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh new file mode 100644 index 00000000..64426684 --- /dev/null +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -0,0 +1,13 @@ +# Symfony2 basic command completion + +_symfony2_get_command_list () { + app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' +} + +_symfony2 () { + if [ -f app/console ]; then + compadd `_symfony2_get_command_list` + fi +} + +compdef _symfony2 app/console \ No newline at end of file