symfony2.plugin.zsh 476 B

123456789101112131415161718192021
  1. # Symfony2 basic command completion
  2. _symfony2_get_command_list () {
  3. php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
  4. }
  5. _symfony2 () {
  6. if [ -f app/console ]; then
  7. compadd `_symfony2_get_command_list`
  8. fi
  9. }
  10. compdef _symfony2 app/console
  11. compdef _symfony2 sf
  12. #Alias
  13. alias sf='php app/console'
  14. alias sfcl='php app/console cache:clear'
  15. alias sfroute='php app/console router:debug'
  16. alias sfgb='php app/console generate:bundle'