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
200a2581
Commit
200a2581
authored
Nov 26, 2012
by
Eric Danielson
Browse files
Add UPDATE_ZSH_DAYS setting
parent
d750e7d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
templates/zshrc.zsh-template
View file @
200a2581
...
...
@@ -17,6 +17,9 @@ ZSH_THEME="robbyrussell"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Change this value to set how frequently ZSH updates¬
export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
...
...
tools/check_for_upgrade.sh
View file @
200a2581
...
...
@@ -14,6 +14,12 @@ function _upgrade_zsh() {
_update_zsh_update
}
epoch_target
=
$UPDATE_ZSH_DAYS
if
[[
-z
"
$epoch_target
"
]]
;
then
# Default to old behavior
epoch_target
=
13
fi
if
[
-f
~/.zsh-update
]
then
.
~/.zsh-update
...
...
@@ -23,7 +29,7 @@ then
fi
epoch_diff
=
$((
$(
_current_epoch
)
-
$LAST_EPOCH
))
if
[
$epoch_diff
-gt
13
]
if
[
$epoch_diff
-gt
$epoch_target
]
then
if
[
"
$DISABLE_UPDATE_PROMPT
"
=
"true"
]
then
...
...
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