Browse code

Initial pass at pesistant directory stack

Matt Cable authored on 27/02/2010 at 23:15:47
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+#!/bin/zsh
1
+# 
2
+# Make the dirstack more persistant
3
+# 
4
+# Run dirpersiststore in ~/.zlogout
5
+
6
+dirpersiststore () {
7
+    dirs -p | sed 's/ /\\ /g;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore
8
+}
9
+
10
+dirpersistrestore () {
11
+    if [ -f ~/.zdirstore ]; then
12
+        source ~/.zdirstore
13
+    fi
14
+}
15
+
16
+DIRSTACKSIZE=10
17
+setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
18
+dirpersistrestore
0 19
\ No newline at end of file