Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
741f6747
Commit
741f6747
authored
Jan 18, 2012
by
John Antoni Griffiths
Browse files
fix for pow plugin to default to current dir
parent
f4944d5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/pow/pow.plugin.zsh
View file @
741f6747
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment