feat(updater): add mode to only remind you to update when it's time (#10187)

Fixes #10187
Co-authored-by: 's avatarNoPreserveRoot <NoPreserveRoot@pm.me>
parent 3c974331
...@@ -26,6 +26,7 @@ ZSH_THEME="robbyrussell" ...@@ -26,6 +26,7 @@ ZSH_THEME="robbyrussell"
# Uncomment the following lines to change the auto-update behavior # Uncomment the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates # zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking # zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days). # Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13 # zstyle ':omz:update' frequency 13
......
...@@ -89,6 +89,8 @@ function update_ohmyzsh() { ...@@ -89,6 +89,8 @@ function update_ohmyzsh() {
# Ask for confirmation before updating unless in auto mode # Ask for confirmation before updating unless in auto mode
if [[ "$update_mode" = auto ]]; then if [[ "$update_mode" = auto ]]; then
update_ohmyzsh update_ohmyzsh
elif [[ "$update_mode" = reminder ]]; then
echo "[oh-my-zsh] It's time to update! You can do that by running \`omz update\`"
else else
# input sink to swallow all characters typed before the prompt # input sink to swallow all characters typed before the prompt
# and add a newline if there wasn't one after characters typed # and add a newline if there wasn't one after characters typed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment