From 196a217413edb28e622ca086a0417172aae26c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yohan=20Tamb=C3=A8?= Date: Thu, 10 Mar 2016 10:49:14 +0100 Subject: [PATCH 1/2] Now Artisan autocompletion display the text helper for each command --- src/_artisan | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/_artisan b/src/_artisan index bbb72f8e17..1104a20452 100644 --- a/src/_artisan +++ b/src/_artisan @@ -35,17 +35,27 @@ # ------- # # * loranger (https://github.com/loranger) +# * Yohan Tambè (https://github.com/Cronos87) # # ------------------------------------------------------------------------------ _artisan_get_command_list () { - php artisan --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' + IFS=" " + php artisan --no-ansi | \ + sed "1,/Available commands/d" | \ + awk '/ [a-z]+/ { print $1 }' | \ + sed -E 's/^[ ]+//g' | \ + sed -E 's/[:]+/\\:/g' | \ + sed -E 's/[ ]{2,}/\:/g' } _artisan () { if [ -f artisan ]; then - compadd `_artisan_get_command_list` + local -a commands + IFS=$'\n' + commands=(`_artisan_get_command_list`) + _describe 'commands' commands fi } From de17e997887d9759bae48e604f97706c88862822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yohan=20Tamb=C3=A8?= Date: Tue, 15 Mar 2016 14:37:55 +0100 Subject: [PATCH 2/2] Fixed categories name as command for Symfony Console --- src/_console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_console b/src/_console index 245b0da64f..7e5b454843 100644 --- a/src/_console +++ b/src/_console @@ -47,7 +47,7 @@ _console_get_command_list () { IFS=" " `_find_console` --no-ansi | \ sed "1,/Available commands/d" | \ - awk '/ [a-z]+/ { print $0 }' | \ + awk '/ [a-z]+/ { print $0 }' | \ sed -E 's/^[ ]+//g' | \ sed -E 's/[:]+/\\:/g' | \ sed -E 's/[ ]{2,}/\:/g'