parent
f4944d5a95
commit
741f6747e4
1 changed files with 20 additions and 5 deletions
@ -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 |
# https://gist.github.com/965032 |
||||||
|
# |
||||||
function kapow { |
function kapow { |
||||||
touch ~/.pow/$1/tmp/restart.txt |
FOLDERNAME=$1 |
||||||
if [ $? -eq 0 ]; then |
if [ -z "$FOLDERNAME" ]; then; FOLDERNAME=${PWD##*/}; fi |
||||||
echo "$fg[yellow]Pow restarting $1...$reset_color" |
touch ~/.pow/$FOLDERNAME/tmp/restart.txt; |
||||||
fi |
if [ $? -eq 0 ]; then; echo "pow: restarting $FOLDERNAME" ; fi |
||||||
} |
} |
||||||
|
|
||||||
compctl -W ~/.pow -/ kapow |
compctl -W ~/.pow -/ kapow |
||||||
|
|||||||
Loading…
Reference in new issue