mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-03 04:20:01 +02:00
feat(update): default to auto update without prompt
This commit is contained in:
parent
45dd7d006a
commit
e09c56f45a
1 changed files with 5 additions and 7 deletions
|
|
@ -6,17 +6,15 @@ fi
|
||||||
# Get user's update preferences
|
# Get user's update preferences
|
||||||
#
|
#
|
||||||
# Supported update modes:
|
# Supported update modes:
|
||||||
# - prompt (default): the user is asked before updating when it's time to update
|
# - auto (default): the update is performed automatically when it's time
|
||||||
# - auto: the update is performed automatically when it's time
|
# - prompt: the user is asked before updating when it's time to update
|
||||||
# - reminder: a reminder is shown to the user when it's time to update
|
# - reminder: a reminder is shown to the user when it's time to update
|
||||||
# - background-alpha: an experimental update-on-the-background option
|
# - background-alpha: an experimental update-on-the-background option
|
||||||
# - disabled: automatic update is turned off
|
# - disabled: automatic update is turned off
|
||||||
zstyle -s ':omz:update' mode update_mode || {
|
zstyle -s ':omz:update' mode update_mode || {
|
||||||
update_mode=prompt
|
update_mode=auto
|
||||||
|
[[ "$DISABLE_UPDATE_PROMPT" = false ]] && update_mode=prompt
|
||||||
# If the mode zstyle setting is not set, support old-style settings
|
[[ "$DISABLE_AUTO_UPDATE" = true ]] && update_mode=disabled
|
||||||
[[ "$DISABLE_UPDATE_PROMPT" != true ]] || update_mode=auto
|
|
||||||
[[ "$DISABLE_AUTO_UPDATE" != true ]] || update_mode=disabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cancel update if:
|
# Cancel update if:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue