1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00
ohmyzsh/plugins/pow/pow.plugin.zsh

26 lines
618 B
Bash
Raw Normal View History

# 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 {
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