diff options
author | Marc Cornellà <marc.cornella@live.com> | 2014-10-09 13:55:50 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2014-11-06 18:33:56 +0100 |
commit | 4310a15de5d0587ef135f9e12857620c4788dec2 (patch) | |
tree | 2b90a55294191a4c3f4d7b5c037476f6f2470796 /plugins/pow | |
parent | 74177c5320b2a1b2f8c4c695c05984b57fd7c6ea (diff) | |
download | zsh-4310a15de5d0587ef135f9e12857620c4788dec2.tar.gz zsh-4310a15de5d0587ef135f9e12857620c4788dec2.tar.bz2 zsh-4310a15de5d0587ef135f9e12857620c4788dec2.zip |
Change all pwd calls for $PWD variable
This avoids spawning additional processes as $PWD **always** contains
the current working directory.
Diffstat (limited to 'plugins/pow')
-rw-r--r-- | plugins/pow/pow.plugin.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/pow/pow.plugin.zsh b/plugins/pow/pow.plugin.zsh index d85c88777..ded3336a7 100644 --- a/plugins/pow/pow.plugin.zsh +++ b/plugins/pow/pow.plugin.zsh @@ -21,13 +21,13 @@ 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 builtin cd ".." 2>/dev/null - basedir="$(pwd)" + basedir="$PWD" done builtin cd "$orgdir" 2>/dev/null @@ -56,7 +56,7 @@ 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 ] |