... | ... |
@@ -19,9 +19,8 @@ dirpersistinstall () { |
19 | 19 |
fi |
20 | 20 |
} |
21 | 21 |
|
22 |
-# FIXME solaris doesn't support tail -r |
|
23 | 22 |
dirpersiststore () { |
24 |
- dirs -p | tail -r | perl -ne 'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"' > $zdirstore |
|
23 |
+ dirs -p | perl -e 'foreach (reverse <STDIN>) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore |
|
25 | 24 |
} |
26 | 25 |
|
27 | 26 |
dirpersistrestore () { |