mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 18:38:00 +00:00
Escape some metachars that trip up .zdirstore script
This commit is contained in:
parent
87920fb111
commit
faca005fe6
@ -5,8 +5,7 @@
|
|||||||
# Run dirpersiststore in ~/.zlogout
|
# Run dirpersiststore in ~/.zlogout
|
||||||
|
|
||||||
dirpersiststore () {
|
dirpersiststore () {
|
||||||
# FIXME: need to escape all shell metacharacters, not just spaces!
|
dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > ~/.zdirstore
|
||||||
dirs -p | sed 's/ /\\ /g;s/&/\\&/;s/^/pushd -q /;1!G;h;$!d;' > ~/.zdirstore
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dirpersistrestore () {
|
dirpersistrestore () {
|
||||||
|
Loading…
Reference in New Issue
Block a user