mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
Merge pull request #2659 from simonc/allowing-pow-path-with-spaces
Allowing path with spaces in pow plugin
This commit is contained in:
commit
ae0c6507e4
1 changed files with 7 additions and 7 deletions
|
@ -21,8 +21,8 @@
|
|||
|
||||
rack_root(){
|
||||
setopt chaselinks
|
||||
local orgdir=$(pwd)
|
||||
local basedir=$(pwd)
|
||||
local orgdir="$(pwd)"
|
||||
local basedir="$(pwd)"
|
||||
|
||||
while [[ $basedir != '/' ]]; do
|
||||
test -e "$basedir/config.ru" && break
|
||||
|
@ -30,7 +30,7 @@ rack_root(){
|
|||
basedir="$(pwd)"
|
||||
done
|
||||
|
||||
builtin cd $orgdir 2>/dev/null
|
||||
builtin cd "$orgdir" 2>/dev/null
|
||||
[[ ${basedir} == "/" ]] && return 1
|
||||
echo $basedir
|
||||
}
|
||||
|
@ -56,19 +56,19 @@ kapow(){
|
|||
compctl -W ~/.pow -/ kapow
|
||||
|
||||
powit(){
|
||||
local basedir=$(pwd)
|
||||
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
|
||||
[ ! -d ~/.pow/${vhost} ] && ln -s "$basedir" ~/.pow/$vhost
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
powed(){
|
||||
local basedir=$(rack_root)
|
||||
local basedir="$(rack_root)"
|
||||
find ~/.pow/ -type l -lname "*$basedir*" -exec basename {}'.dev' \;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue