diff --git a/plugins/laravel4/laravel4.plugin.zsh b/plugins/laravel4/laravel4.plugin.zsh new file mode 100644 index 000000000000..fdffa7571be4 --- /dev/null +++ b/plugins/laravel4/laravel4.plugin.zsh @@ -0,0 +1,19 @@ +# Laravel 4: Artisan basic command completion + +_laravel4_get_command_list () { + php artisan | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' +} + +_laravel4 () { + if [ -f artisan ]; then + compadd `_laravel4_get_command_list` + fi +} + +compdef _laravel4 php artisan +compdef _laravel4 artisan + +#Alias +alias artisan='php artisan' +alias artisan2cl='php artisan cache:clear' +alias artisan2routes='php artisan routes'