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
Ohmyzsh
Commits
f9b4356e
Commit
f9b4356e
authored
Jan 18, 2012
by
John Antoni Griffiths
Browse files
bug : stop creating those ~ directories
add powit command to symlink an app if it hasn't been already
parent
3841da15
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/pow/pow.plugin.zsh
View file @
f9b4356e
...
...
@@ -34,6 +34,7 @@ rack_root_detect(){
[[
${
basedir
}
==
"/"
]]
&&
return
1
echo
`
basename
$basedir
|
sed
-E
"s/.(com|net|org)//"
`
}
kapow
(){
local
vhost
=
$1
[
!
-n
"
$vhost
"
]
&&
vhost
=
$(
rack_root_detect
)
...
...
@@ -43,11 +44,23 @@ kapow(){
return
1
fi
#
[ ! -d
"
~/.pow/${vhost}/tmp
"
] &&
mkdir -p
"
~/.pow/$vhost/tmp
"
[
!
-d
~/.pow/
${
vhost
}
/tmp
]
&&
mkdir
-p
~/.pow/
$vhost
/tmp
touch
~/.pow/
$vhost
/tmp/restart.txt
;
[
$?
-eq
0
]
&&
echo
"pow: restarting
$vhost
.dev"
}
compctl
-W
~/.pow -/ kapow
powit
(){
local
basedir
=
$(
pwd
)
local
vhost
=
$1
[
!
-n
"
$vhost
"
]
&&
vhost
=
$(
rack_root_detect
)
if
[
!
-h
~/.pow/
$vhost
]
then
echo
"pow: Symlinking your app with pow.
${
vhost
}
"
[
!
-d
~/.pow/
${
vhost
}
]
&&
ln
-s
$basedir
~/.pow/
$vhost
return
1
fi
}
# View the standard out (puts) from any pow app
alias
kaput
=
"tail -f ~/Library/Logs/Pow/apps/*"
\ No newline at end of file
alias
kaput
=
"tail -f ~/Library/Logs/Pow/apps/*"
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