Commit 3add6a2a authored by Matt Cable's avatar Matt Cable
Browse files

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

parent 2ff567e1
......@@ -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 () {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment