Last active
November 23, 2017 00:03
-
-
Save arandilopez/959fd298e2742e322ff68001687f80ec to your computer and use it in GitHub Desktop.
Add zsh completion to laravel artisan comands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Laravel 5 basic command completion | |
_laravel5_get_command_list () { | |
php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }' | |
} | |
_artisan () { | |
if [ -f artisan ]; then | |
compadd `_laravel5_get_command_list` | |
fi | |
} | |
compdef _artisan artisan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment