diff options
author | Matt Cable <wozz@wookie.net> | 2010-09-19 22:40:47 -0600 |
---|---|---|
committer | Matt Cable <wozz@wookie.net> | 2010-09-19 22:40:47 -0600 |
commit | 8f7609b4fabd3d02e3991221cbe35bea692c22e3 (patch) | |
tree | 4144a7ea22b986110725582aee158788b92b6fe5 | |
parent | 610f68c8e0401048f87d1f2bd48086b8c0cd0dbe (diff) | |
download | zsh-8f7609b4fabd3d02e3991221cbe35bea692c22e3.tar.gz zsh-8f7609b4fabd3d02e3991221cbe35bea692c22e3.tar.bz2 zsh-8f7609b4fabd3d02e3991221cbe35bea692c22e3.zip |
Change zdirstore to variable
-rw-r--r-- | plugins/dirpersist.plugin.zsh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index 4decd8b30..5b3fdfb3d 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -5,6 +5,9 @@ # Add dirpersist to $plugins in ~/.zshrc to load # +# $zdirstore is the file used to persist the stack +zdirstore=~/.zdirstore + dirpersistinstall () { if grep -qL 'dirpersiststore' ~/.zlogout; then else @@ -17,12 +20,12 @@ dirpersistinstall () { } dirpersiststore () { - dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore + dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore } dirpersistrestore () { - if [ -f ~/.zdirstore ]; then - source ~/.zdirstore + if [ -f $zdirstore ]; then + source $zdirstore fi } |