...
|
...
|
@@ -5,7 +5,8 @@
|
5
|
5
|
# Run dirpersiststore in ~/.zlogout
|
6
|
6
|
|
7
|
7
|
dirpersiststore () {
|
8
|
|
- dirs -p | sed 's/ /\\ /g;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore
|
|
8
|
+# FIXME: need to escape all shell metacharacters, not just spaces!
|
|
9
|
+ dirs -p | sed 's/ /\\ /g;s/&/\\&/;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore
|
9
|
10
|
}
|
10
|
11
|
|
11
|
12
|
dirpersistrestore () {
|
...
|
...
|
@@ -19,4 +20,4 @@ setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
|
19
|
19
|
dirpersistrestore
|
20
|
20
|
|
21
|
21
|
# Make popd changes permanent without having to wait for logout
|
22
|
|
-alias popd="popd;dirpersiststore"
|
23
|
22
|
\ No newline at end of file
|
|
23
|
+alias popd="popd;dirpersiststore"
|