mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-05-11 05:55:17 +00:00
Change all pwd calls for $PWD variable
This avoids spawning additional processes as $PWD **always** contains the current working directory.
This commit is contained in:
@@ -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 ]
|
||||
|
Reference in New Issue
Block a user