pow.plugin.zsh 618 B

12345678910111213141516171819202122232425
  1. # Restart a rack app running under pow
  2. # http://pow.cx/
  3. #
  4. # Adds a kapow command that will restart an app
  5. #
  6. # $ kapow myapp
  7. # $ kapow # defaults to current directory
  8. #
  9. # Supports command completion.
  10. #
  11. # If you are not already using completion you might need to enable it with
  12. #
  13. # autoload -U compinit compinit
  14. #
  15. # Thanks also to Christopher Sexton
  16. # https://gist.github.com/965032
  17. #
  18. function kapow {
  19. FOLDERNAME=$1
  20. if [ -z "$FOLDERNAME" ]; then; FOLDERNAME=${PWD##*/}; fi
  21. touch ~/.pow/$FOLDERNAME/tmp/restart.txt;
  22. if [ $? -eq 0 ]; then; echo "pow: restarting $FOLDERNAME" ; fi
  23. }
  24. compctl -W ~/.pow -/ kapow