Every time I open up terminal on a Mac I get the prompt
Would you like to check for updates?
I find it quite annoying. Anyway to stop it from doing so?
Every time I open up terminal on a Mac I get the prompt
Would you like to check for updates?
I find it quite annoying. Anyway to stop it from doing so?
You have to add DISABLE_AUTO_UPDATE="true"
on your .zshrc
before the source $ZSH/oh-my-zsh.sh
line. By doing so, oh-my-zsh will just skip the update checking script.
Set environment variable DISABLE_UPDATE_PROMPT=true
to always reply Yes and automatically upgrade.
Set environment variable DISABLE_AUTO_UPDATE=true
to always reply No and never upgrade.
Simply add one of these in your ~/.zshrc
somewhere before calling source $ZSH/oh-my-zsh.sh
.
UPDATE_ZSH_DAYS
variable as well. That accepts an integer to specify a frequency in days. –
Neckpiece ~/.zshrc
(with comments!). –
Eloign DISABLE_UPDATE_PROMPT=true
should be the default out of box. I probably will ditch ohmyzsh one day b/c of this anoyance. –
Precincts You have to add DISABLE_AUTO_UPDATE="true"
on your .zshrc
before the source $ZSH/oh-my-zsh.sh
line. By doing so, oh-my-zsh will just skip the update checking script.
Other answers might reference deprecated method for updating the settings.
As per OhMyZsh wiki, there is a section talking about Deprecated settings
.
These settings are still supported but will be removed in a future version of Oh My Zsh. Migrate to the
zstyle
settings while you still can.
For example, the following two methods achieve the same result:
.zshrc
)DISABLE_AUTO_UPDATE=true
zstyle
Setting)zstyle ':omz:update' mode disabled
I'm surprised no one mentioned the new and fine-tuned controls over OhMyZsh updates, that deprecates the old method.
This of course does not prevent you from invoking zstyle
from .zshrc
.
You can try the following commands that are stated by OMZ docs:
You have several options to tweak OMZ updates.
By default, you will be prompted to check for updates every 2 weeks. You can choose other update modes by adding a line to your ~/.zshrc file, before Oh My Zsh is loaded:
Automatic update without confirmation prompt:
zstyle ':omz:update' mode auto
zstyle ':omz:update' mode reminder
zstyle ':omz:update' mode disabled
# This will check for updates every 7 days
zstyle ':omz:update' frequency 7
# This will check for updates every time you open the terminal (not recommended)
zstyle ':omz:update' frequency 0
zstyle
precondition)zstyle
) have to be executed strictly from within an OhMyZsh shell.exec /bin/zsh
, this probably applies to .zshrc
as well.zstyle
man zshmodules
zstyle
or environment variables in .zshrc
–
Lyda .zshrc
is deprecated and will be removed in the future. zstyle
is encouraged to be used instead. Here's the source for that. Note, that you can invoke and sprinkle zstyle
in your .zshrc
file. –
Boogiewoogie zstyle ':omz:update' frequency 7
? Does the "reminder" mean the update prompt or just a message the prints when you open a shell? –
Marathi reminder
is different from the prompt
as the former is non-intrusive. I think reminder
should be the default. No clue why they thought it was a good idea for the prompt
to be the default. –
Boogiewoogie Go to ~/.oh-my-zsh/tools/check-for-upgrade.sh and replace all contents of this file with
true;
Everything else seems to be unreliable.
I have set an update on background. My crontab:
0 0 * * 0 /bin/zsh -i -c 'omz update' >/dev/null 2>&1
© 2022 - 2024 — McMap. All rights reserved.
zstyle ':omz:update' mode auto
– Boogiewoogie