741f6747e418229deec62ae2d19c776f6494e219

Author
John Antoni Griffiths <john@johnantoni.com>
Committer
John Antoni Griffiths <john@johnantoni.com>
Date

Message

fix for pow plugin to default to current dir

Diff

 1diff --git a/plugins/pow/pow.plugin.zsh b/plugins/pow/pow.plugin.zsh
 2index 6b2a6f2be0f3636c9026eb82a0405eebc79669b4..da94b657bfba701a07aa679adeb3ad90546167a2 100644
 3--- a/plugins/pow/pow.plugin.zsh
 4+++ b/plugins/pow/pow.plugin.zsh
 5@@ -1,10 +1,25 @@
 6-# Thanks to Christopher Sexton
 7+# Restart a rack app running under pow
 8+# http://pow.cx/
 9+#
10+# Adds a kapow command that will restart an app
11+#
12+#   $ kapow myapp
13+#   $ kapow # defaults to current directory
14+#
15+# Supports command completion.
16+#
17+# If you are not already using completion you might need to enable it with
18+# 
19+#    autoload -U compinit compinit
20+#
21+# Thanks also to Christopher Sexton
22 # https://gist.github.com/965032
23+#
24 function kapow {
25-	touch ~/.pow/$1/tmp/restart.txt
26-	if [ $? -eq 0 ]; then
27-		echo "$fg[yellow]Pow restarting $1...$reset_color"
28-	fi
29+	FOLDERNAME=$1
30+	if [ -z "$FOLDERNAME" ]; then; FOLDERNAME=${PWD##*/}; fi
31+	touch ~/.pow/$FOLDERNAME/tmp/restart.txt;
32+	if [ $? -eq 0 ]; then; echo "pow: restarting $FOLDERNAME" ; fi
33 }
34 
35 compctl -W ~/.pow -/ kapow