From a63bcd1bf4f2237674ed18b3a392f494e1c7786e Mon Sep 17 00:00:00 2001 From: Ha The Tung Date: Wed, 16 Dec 2015 11:58:29 +0700 Subject: [PATCH] symfony console completion should also work with php app/console --- src/_console | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/_console b/src/_console index fc2a6f0..5da638e 100644 --- a/src/_console +++ b/src/_console @@ -39,6 +39,10 @@ # ------------------------------------------------------------------------------ +_app_console_get_command_list () { + php app/console --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' +} + _console_get_command_list () { php console --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' } @@ -46,8 +50,11 @@ _console_get_command_list () { _console () { if [ -f console ]; then compadd `_console_get_command_list` + elif [ -f app/console ]; then + compadd `_app_console_get_command_list` fi } +compdef _console php app/console compdef _console php console compdef _console console