Browse code

Change zdirstore to variable

Matt Cable authored on 20/09/2010 at 04:40:47
Showing 1 changed files
... ...
@@ -5,6 +5,9 @@
5 5
 # Add dirpersist to $plugins in ~/.zshrc to load
6 6
 # 
7 7
 
8
+# $zdirstore is the file used to persist the stack
9
+zdirstore=~/.zdirstore
10
+
8 11
 dirpersistinstall () {
9 12
     if grep -qL 'dirpersiststore' ~/.zlogout; then
10 13
     else
... ...
@@ -17,12 +20,12 @@ dirpersistinstall () {
17 17
 }
18 18
 
19 19
 dirpersiststore () {
20
-    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 21
 }
22 22
 
23 23
 dirpersistrestore () {
24
-    if [ -f ~/.zdirstore ]; then
25
-        source ~/.zdirstore
24
+    if [ -f $zdirstore ]; then
25
+        source $zdirstore
26 26
     fi
27 27
 }
28 28