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/dirhistory/dirhistory.plugin.zsh | |
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/dirhistory/dirhistory.plugin.zsh')
-rw-r--r-- | plugins/dirhistory/dirhistory.plugin.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 504d7ec14..d101cfcae 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -3,7 +3,7 @@ # that the user has changed to in the past, and ALT-RIGHT undoes ALT-LEFT. # -dirhistory_past=(`pwd`) +dirhistory_past=($PWD) dirhistory_future=() export dirhistory_past export dirhistory_future @@ -50,7 +50,7 @@ function push_future() { # Called by zsh when directory changes function chpwd() { - push_past `pwd` + push_past $PWD # If DIRHISTORY_CD is not set... if [[ -z "${DIRHISTORY_CD+x}" ]]; then # ... clear future. @@ -73,7 +73,7 @@ function dirhistory_back() { pop_past cw if [[ "" == "$cw" ]]; then # Someone overwrote our variable. Recover it. - dirhistory_past=(`pwd`) + dirhistory_past=($PWD) return fi |