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
dd1a7269
Unverified
Commit
dd1a7269
authored
May 04, 2020
by
Marc Cornellà
Committed by
GitHub
May 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: refresh zcompdump cache file in init script (#8878)
parent
173d4ca6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
oh-my-zsh.sh
oh-my-zsh.sh
+19
-0
No files found.
oh-my-zsh.sh
View file @
dd1a7269
...
@@ -61,6 +61,18 @@ if [ -z "$ZSH_COMPDUMP" ]; then
...
@@ -61,6 +61,18 @@ if [ -z "$ZSH_COMPDUMP" ]; then
ZSH_COMPDUMP
=
"
${
ZDOTDIR
:-${
HOME
}}
/.zcompdump-
${
SHORT_HOST
}
-
${
ZSH_VERSION
}
"
ZSH_COMPDUMP
=
"
${
ZDOTDIR
:-${
HOME
}}
/.zcompdump-
${
SHORT_HOST
}
-
${
ZSH_VERSION
}
"
fi
fi
# Construct zcompdump OMZ metadata
zcompdump_metadata
=
"
\
#omz revision:
$(
cd
-q
"
$ZSH
"
;
git rev-parse HEAD 2>/dev/null
)
#omz fpath:
$fpath
\
"
# Delete the zcompdump file if OMZ zcompdump metadata changed
if
!
cmp
-s
<
(
command grep
'^#omz'
"
$ZSH_COMPDUMP
"
2>/dev/null
)
<<<
"
$zcompdump_metadata
"
;
then
command rm
-f
"
$ZSH_COMPDUMP
"
zcompdump_refresh
=
1
fi
if
[[
$ZSH_DISABLE_COMPFIX
!=
true
]]
;
then
if
[[
$ZSH_DISABLE_COMPFIX
!=
true
]]
;
then
source
$ZSH
/lib/compfix.zsh
source
$ZSH
/lib/compfix.zsh
# If completion insecurities exist, warn the user
# If completion insecurities exist, warn the user
...
@@ -72,6 +84,13 @@ else
...
@@ -72,6 +84,13 @@ else
compinit
-u
-C
-d
"
${
ZSH_COMPDUMP
}
"
compinit
-u
-C
-d
"
${
ZSH_COMPDUMP
}
"
fi
fi
# Append zcompdump metadata if missing
if
((
$zcompdump_refresh
))
;
then
echo
"
\n
$zcompdump_metadata
"
>>!
"
$ZSH_COMPDUMP
"
fi
unset
zcompdump_metadata zcompdump_refresh
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore
# TIP: Add files you don't want in git to .gitignore
...
...
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