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
8f7609b4
Commit
8f7609b4
authored
Sep 19, 2010
by
Matt Cable
Browse files
Change zdirstore to variable
parent
610f68c8
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/dirpersist.plugin.zsh
View file @
8f7609b4
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
# Add dirpersist to $plugins in ~/.zshrc to load
# Add dirpersist to $plugins in ~/.zshrc to load
#
#
# $zdirstore is the file used to persist the stack
zdirstore
=
~/.zdirstore
dirpersistinstall
()
{
dirpersistinstall
()
{
if
grep
-qL
'dirpersiststore'
~/.zlogout
;
then
if
grep
-qL
'dirpersiststore'
~/.zlogout
;
then
else
else
...
@@ -17,12 +20,12 @@ dirpersistinstall () {
...
@@ -17,12 +20,12 @@ dirpersistinstall () {
}
}
dirpersiststore
()
{
dirpersiststore
()
{
dirs
-p
|
tail
-r
| perl
-ne
'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"'
>
~/.
zdirstore
dirs
-p
|
tail
-r
| perl
-ne
'chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"'
>
$
zdirstore
}
}
dirpersistrestore
()
{
dirpersistrestore
()
{
if
[
-f
~/.
zdirstore
]
;
then
if
[
-f
$
zdirstore
]
;
then
source
~/.
zdirstore
source
$
zdirstore
fi
fi
}
}
...
...
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