mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Merge pull request #398 from Cronos87/master
Now Artisan autocompletion display the text helper for each command
This commit is contained in:
+12
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user