Browse Source

Portable perl dirpersiststore because 'tail -r' doesn't work everywhere.

master
Matt Cable 14 years ago
parent
commit
6fe935d59e
  1. 3
      plugins/dirpersist.plugin.zsh

3
plugins/dirpersist.plugin.zsh

@ -19,9 +19,8 @@ dirpersistinstall () {
fi fi
} }
# FIXME solaris doesn't support tail -r
dirpersiststore () { 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 () { dirpersistrestore () {

Loading…
Cancel
Save