diff options
author | Simon Courtois <scourtois_github@cubyx.fr> | 2014-03-25 17:16:20 +0100 |
---|---|---|
committer | Simon Courtois <scourtois_github@cubyx.fr> | 2014-03-25 17:16:20 +0100 |
commit | 015b742153654c0b127f8f158ab80e51f6ea8ec3 (patch) | |
tree | 7723f8c68bb9e2cf98e1bbcd8fb31914daae1319 /plugins | |
parent | ffc17b6b4d55f74b9d3786ba790b7340865e5014 (diff) | |
download | zsh-015b742153654c0b127f8f158ab80e51f6ea8ec3.tar.gz zsh-015b742153654c0b127f8f158ab80e51f6ea8ec3.tar.bz2 zsh-015b742153654c0b127f8f158ab80e51f6ea8ec3.zip |
Allowing path with spaces in pow plugin
This commit allows for paths with spaces to be symlinked
in Pow.
If an application is located in a folder like `/some path/to the/app`
the powit command would fail when it shouldn't. It's not the case
anymore.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/pow/pow.plugin.zsh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/pow/pow.plugin.zsh b/plugins/pow/pow.plugin.zsh index 7f86c0c76..d85c88777 100644 --- a/plugins/pow/pow.plugin.zsh +++ b/plugins/pow/pow.plugin.zsh @@ -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' \; } @@ -82,4 +82,4 @@ repow(){ } # 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/*" |