mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
Escape some metachars that trip up .zdirstore script
This commit is contained in:
parent
21e2a913bf
commit
181a2ed537
1 changed files with 1 additions and 2 deletions
|
@ -5,8 +5,7 @@
|
|||
# Run dirpersiststore in ~/.zlogout
|
||||
|
||||
dirpersiststore () {
|
||||
# FIXME: need to escape all shell metacharacters, not just spaces!
|
||||
dirs -p | sed 's/ /\\ /g;s/&/\\&/;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore
|
||||
dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore
|
||||
}
|
||||
|
||||
dirpersistrestore () {
|
||||
|
|
Loading…
Reference in a new issue