Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
3add6a2a
Commit
3add6a2a
authored
Sep 26, 2010
by
Matt Cable
Browse files
Portable perl dirpersiststore because 'tail -r' doesn't work everywhere.
parent
2ff567e1
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/dirpersist.plugin.zsh
View file @
3add6a2a
...
@@ -19,9 +19,8 @@ dirpersistinstall () {
...
@@ -19,9 +19,8 @@ dirpersistinstall () {
fi
fi
}
}
# FIXME solaris doesn't support tail -r
dirpersiststore
()
{
dirpersiststore
()
{
dirs
-p
|
tail
-r
|
perl
-
n
e
'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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment