Browse code

Move dirpersist to plugin

Matt Cable authored on 20/09/2010 at 01:39:51
Showing 2 changed files
1 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-#!/bin/zsh
2
-# 
3
-# Make the dirstack more persistant
4
-# 
5
-# Run dirpersiststore in ~/.zlogout
6
-
7
-dirpersiststore () {
8
-    dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore
9
-}
10
-
11
-dirpersistrestore () {
12
-    if [ -f ~/.zdirstore ]; then
13
-        source ~/.zdirstore
14
-    fi
15
-}
16
-
17
-DIRSTACKSIZE=10
18
-setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
19
-dirpersistrestore
20
-
21
-# Make popd changes permanent without having to wait for logout
22
-alias popd="popd;dirpersiststore"
23 1
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+#!/bin/zsh
1
+# 
2
+# Make the dirstack more persistant
3
+# 
4
+# Run dirpersiststore in ~/.zlogout
5
+
6
+dirpersiststore () {
7
+    dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.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
19
+
20
+# Make popd changes permanent without having to wait for logout
21
+alias popd="popd;dirpersiststore"