Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
74188146
Unverified
Commit
74188146
authored
Oct 06, 2021
by
Ryan Zegray
Committed by
GitHub
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(z): update z to latest version (#10267)
parent
bf7c1b16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
z.sh
plugins/z/z.sh
+10
-6
No files found.
plugins/z/z.sh
View file @
74188146
...
...
@@ -42,6 +42,8 @@ _z() {
[
-z
"
$_Z_OWNER
"
-a
-f
"
$datafile
"
-a
!
-O
"
$datafile
"
]
&&
return
_z_dirs
()
{
[
-f
"
$datafile
"
]
||
return
local
line
while
read
line
;
do
# only count directories
...
...
@@ -54,14 +56,16 @@ _z() {
if
[
"
$1
"
=
"--add"
]
;
then
shift
# $HOME
is
n't worth matching
[
"
$*
"
=
"
$HOME
"
]
&&
return
# $HOME
and / are
n't worth matching
[
"
$*
"
=
"
$HOME
"
-o
"
$*
"
=
'/'
]
&&
return
# don't track excluded directory trees
if
[
${#
_Z_EXCLUDE_DIRS
[@]
}
-gt
0
]
;
then
local
exclude
for
exclude
in
"
${
_Z_EXCLUDE_DIRS
[@]
}
"
;
do
case
"
$*
"
in
"
$exclude
*"
)
return
;;
esac
case
"
$*
"
in
"
$exclude
"
*
)
return
;;
esac
done
fi
# maintain the data file
local
tempfile
=
"
$datafile
.
$RANDOM
"
...
...
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