From 4faaed9f6c560fcfa393f9df411476e8d7350017 Mon Sep 17 00:00:00 2001 From: Laurent Goussard Date: Wed, 7 Jan 2015 10:39:53 +0100 Subject: [PATCH] [Upg] Allow to invoke console from project instead of app directory --- src/_console | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/_console b/src/_console index fc2a6f0..47f8228 100644 --- a/src/_console +++ b/src/_console @@ -38,15 +38,16 @@ # # ------------------------------------------------------------------------------ +_find_console () { + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" +} _console_get_command_list () { - php console --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' + `_find_console` --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' } _console () { - if [ -f console ]; then - compadd `_console_get_command_list` - fi + compadd `_console_get_command_list` } compdef _console php console