Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for pow plugin to default to current dir

  • Loading branch information...
commit 741f6747e418229deec62ae2d19c776f6494e219 1 parent f4944d5
John Antoni Griffiths authored
Showing with 20 additions and 5 deletions.
  1. +20 −5 plugins/pow/pow.plugin.zsh
View
25 plugins/pow/pow.plugin.zsh
@@ -1,10 +1,25 @@
-# Thanks to Christopher Sexton
+# Restart a rack app running under pow
+# http://pow.cx/
+#
+# Adds a kapow command that will restart an app
+#
+# $ kapow myapp
+# $ kapow # defaults to current directory
+#
+# Supports command completion.
+#
+# If you are not already using completion you might need to enable it with
+#
+# autoload -U compinit compinit
+#
+# Thanks also to Christopher Sexton
# https://gist.github.com/965032
+#
function kapow {
- touch ~/.pow/$1/tmp/restart.txt
- if [ $? -eq 0 ]; then
- echo "$fg[yellow]Pow restarting $1...$reset_color"
- fi
+ FOLDERNAME=$1
+ if [ -z "$FOLDERNAME" ]; then; FOLDERNAME=${PWD##*/}; fi
+ touch ~/.pow/$FOLDERNAME/tmp/restart.txt;
+ if [ $? -eq 0 ]; then; echo "pow: restarting $FOLDERNAME" ; fi
}
compctl -W ~/.pow -/ kapow
Please sign in to comment.
Something went wrong with that request. Please try again.