summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <hello@mcornella.com>2021-09-30 17:22:04 +0200
committerMarc Cornellà <hello@mcornella.com>2021-10-04 10:47:10 +0200
commit0120749a54d147405beebe6f8416da0e4443ebc4 (patch)
tree17d9e87a3373bb75a1e950b8e754d4f498cdb487
parent3c9743313cc916a6cede71e333eecef4b07ce3ce (diff)
downloadzsh-0120749a54d147405beebe6f8416da0e4443ebc4.tar.gz
zsh-0120749a54d147405beebe6f8416da0e4443ebc4.tar.bz2
zsh-0120749a54d147405beebe6f8416da0e4443ebc4.zip
feat(updater): add mode to only remind you to update when it's time (#10187)
Fixes #10187 Co-authored-by: NoPreserveRoot <NoPreserveRoot@pm.me>
-rw-r--r--templates/zshrc.zsh-template1
-rw-r--r--tools/check_for_upgrade.sh2
2 files changed, 3 insertions, 0 deletions
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index 7cb87078c..58642bc41 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -26,6 +26,7 @@ ZSH_THEME="robbyrussell"
# Uncomment the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# 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).
# zstyle ':omz:update' frequency 13
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index fa832ffac..e6a4a3d69 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -89,6 +89,8 @@ function update_ohmyzsh() {
# Ask for confirmation before updating unless in auto mode
if [[ "$update_mode" = auto ]]; then
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
# input sink to swallow all characters typed before the prompt
# and add a newline if there wasn't one after characters typed