laravel5.plugin.zsh 457 B

1234567891011121314151617181920
  1. # Laravel5 basic command completion
  2. _laravel5_get_command_list () {
  3. php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
  4. }
  5. _laravel5 () {
  6. if [ -f artisan ]; then
  7. compadd `_laravel5_get_command_list`
  8. fi
  9. }
  10. compdef _laravel5 artisan
  11. compdef _laravel5 la5
  12. #Alias
  13. alias la5='php artisan'
  14. alias la5cache='php artisan cache:clear'
  15. alias la5routes='php artisan route:list'
  16. alias la5vendor='php artisan vendor:publish'