diff options
author | Matt Cable <wozz@wookie.net> | 2010-09-26 21:30:57 -0600 |
---|---|---|
committer | Matt Cable <wozz@wookie.net> | 2010-09-26 21:30:57 -0600 |
commit | 3add6a2ac47186240a2d02a986ae22b6519d965f (patch) | |
tree | 0e2f383fc70d7ba814536ba3cf2614e8966d4ad1 /plugins/dirpersist.plugin.zsh | |
parent | 2ff567e16267274041f542b5bce18876b8815fca (diff) | |
download | zsh-3add6a2ac47186240a2d02a986ae22b6519d965f.tar.gz zsh-3add6a2ac47186240a2d02a986ae22b6519d965f.tar.bz2 zsh-3add6a2ac47186240a2d02a986ae22b6519d965f.zip |
Portable perl dirpersiststore because 'tail -r' doesn't work everywhere.
Diffstat (limited to 'plugins/dirpersist.plugin.zsh')
-rw-r--r-- | plugins/dirpersist.plugin.zsh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/dirpersist.plugin.zsh b/plugins/dirpersist.plugin.zsh index b5e825bff..6a2b289a2 100644 --- a/plugins/dirpersist.plugin.zsh +++ b/plugins/dirpersist.plugin.zsh @@ -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 () { |