mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01: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:
parent
74177c5320
commit
4310a15de5
6 changed files with 13 additions and 13 deletions
|
|
@ -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 ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue