mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
Escape &'s in path name. Need to find general function for escaping all
shell metacharacters.
This commit is contained in:
parent
870551e960
commit
21e2a913bf
1 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,8 @@
|
|||
# Run dirpersiststore in ~/.zlogout
|
||||
|
||||
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 () {
|
||||
|
@ -19,4 +20,4 @@ setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
|
|||
dirpersistrestore
|
||||
|
||||
# Make popd changes permanent without having to wait for logout
|
||||
alias popd="popd;dirpersiststore"
|
||||
alias popd="popd;dirpersiststore"
|
||||
|
|
Loading…
Reference in a new issue