mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 00:40:07 +00:00
Portable perl dirpersiststore because 'tail -r' doesn't work everywhere.
This commit is contained in:
parent
2ff567e162
commit
3add6a2ac4
1 changed files with 1 additions and 2 deletions
|
@ -19,9 +19,8 @@ dirpersistinstall () {
|
|||
fi
|
||||
}
|
||||
|
||||
# FIXME solaris doesn't support tail -r
|
||||
dirpersiststore () {
|
||||
dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore
|
||||
dirs -p | perl -e 'foreach (reverse <STDIN>) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore
|
||||
}
|
||||
|
||||
dirpersistrestore () {
|
||||
|
|
Loading…
Reference in a new issue