1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00

Escape &'s in path name. Need to find general function for escaping all

shell metacharacters.
This commit is contained in:
Matt Cable 2010-04-02 15:24:41 -06:00
parent 870551e960
commit 21e2a913bf

View file

@ -5,7 +5,8 @@
# Run dirpersiststore in ~/.zlogout # Run dirpersiststore in ~/.zlogout
dirpersiststore () { dirpersiststore () {
dirs -p | sed 's/ /\\ /g;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore # FIXME: need to escape all shell metacharacters, not just spaces!
dirs -p | sed 's/ /\\ /g;s/&/\\&/;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore
} }
dirpersistrestore () { dirpersistrestore () {