Browse Source

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

shell metacharacters.
master
Matt Cable 15 years ago
parent
commit
87920fb111
  1. 3
      lib/dirspersist.zsh

3
lib/dirspersist.zsh

@ -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 () {

Loading…
Cancel
Save