8f7609b4fabd3d02e3991221cbe35bea692c22e3

Author
Matt Cable <wozz@wookie.net>
Committer
Matt Cable <wozz@wookie.net>
Date

Message

Change zdirstore to variable

Diff

 1diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh
 2index 4decd8b30513bf4ba59cf34d26215c87349fae19..5b3fdfb3d686f30f8b0b9f7633a1a82f3763486a 100644
 3--- a/plugins/dirpersist.plugin.zsh
 4+++ b/plugins/dirpersist.plugin.zsh
 5@@ -5,6 +5,9 @@
 6 # Add dirpersist to $plugins in ~/.zshrc to load
 7 # 
 8 
 9+# $zdirstore is the file used to persist the stack
10+zdirstore=~/.zdirstore
11+
12 dirpersistinstall () {
13     if grep -qL 'dirpersiststore' ~/.zlogout; then
14     else
15@@ -17,12 +20,12 @@ dirpersistinstall () {
16 }
17 
18 dirpersiststore () {
19-    dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore
20+    dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore
21 }
22 
23 dirpersistrestore () {
24-    if [ -f ~/.zdirstore ]; then
25-        source ~/.zdirstore
26+    if [ -f $zdirstore ]; then
27+        source $zdirstore
28     fi
29 }
30