cloudfoundry.plugin.zsh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Some Useful CloudFoundry Aliases & Functions
  2. alias cfl="cf login"
  3. alias cft="cf target"
  4. alias cfa="cf apps"
  5. alias cfs="cf services"
  6. alias cfm="cf marketplace"
  7. alias cfp="cf push"
  8. alias cfcs="cf create-service"
  9. alias cfbs="cf bind-service"
  10. alias cfus="cf unbind-service"
  11. alias cfds="cf delete-service"
  12. alias cfup="cf cups"
  13. alias cflg="cf logs"
  14. alias cfr="cf routes"
  15. alias cfe="cf env"
  16. alias cfsh="cf ssh"
  17. alias cfsc="cf scale"
  18. alias cfev="cf events"
  19. alias cfdor="cf delete-orphaned-routes"
  20. alias cfbpk="cf buildpacks"
  21. alias cfdm="cf domains"
  22. alias cfsp="cf spaces"
  23. function cfap() { cf app $1 }
  24. function cfh.() { export CF_HOME=$PWD/.cf }
  25. function cfh~() { export CF_HOME=~/.cf }
  26. function cfhu() { unset CF_HOME }
  27. function cfpm() { cf push -f $1 }
  28. function cflr() { cf logs $1 --recent }
  29. function cfsrt() { cf start $1 }
  30. function cfstp() { cf stop $1 }
  31. function cfstg() { cf restage $1 }
  32. function cfdel() { cf delete $1 }
  33. function cfsrtall() {cf apps | awk '/stopped/ { system("cf start " $1)}'}
  34. function cfstpall() {cf apps | awk '/started/ { system("cf stop " $1)}'}