cakephp3.plugin.zsh 420 B

12345678910111213141516171819
  1. # CakePHP 3 basic command completion
  2. _cakephp3_get_command_list () {
  3. cakephp3commands=($(bin/cake completion commands));printf "%s\n" "${cakephp3commands[@]}"
  4. }
  5. _cakephp3 () {
  6. if [ -f bin/cake ]; then
  7. compadd `_cakephp3_get_command_list`
  8. fi
  9. }
  10. compdef _cakephp3 bin/cake
  11. compdef _cakephp3 cake
  12. #Alias
  13. alias c3='bin/cake'
  14. alias c3cache='bin/cake orm_cache clear'
  15. alias c3migrate='bin/cake migrations migrate'