laravel4.plugin.zsh 450 B

1234567891011121314151617181920
  1. # Laravel4 basic command completion
  2. _laravel4_get_command_list () {
  3. php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
  4. }
  5. _laravel4 () {
  6. if [ -f artisan ]; then
  7. compadd `_laravel4_get_command_list`
  8. fi
  9. }
  10. compdef _laravel4 artisan
  11. compdef _laravel4 la4
  12. #Alias
  13. alias la4='php artisan'
  14. alias la4dump='php artisan dump-autoload'
  15. alias la4cache='php artisan cache:clear'
  16. alias la4routes='php artisan routes'