0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

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

Fixes #10187

Co-authored-by: NoPreserveRoot <NoPreserveRoot@pm.me>
This commit is contained in:
Marc Cornellà 2021-09-30 17:22:04 +02:00
parent 3c9743313c
commit 0120749a54
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B
2 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -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