From d605f780a44d3953b80f1a5143790a4c06ba9f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 19 Oct 2021 06:24:52 +0200 Subject: [PATCH] Document zstyle update settings --- Settings.md | 79 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/Settings.md b/Settings.md index 2146d1f..dc42be2 100644 --- a/Settings.md +++ b/Settings.md @@ -11,9 +11,9 @@ - [`ZSH_CUSTOM`](#zsh_custom) - [`ZSH_CACHE_DIR`](#zsh_cache_dir) - [Update settings](#update-settings) - - [`DISABLE_AUTO_UPDATE`](#disable_auto_update) - - [`DISABLE_UPDATE_PROMPT`](#disable_update_prompt) - - [`UPDATE_ZSH_DAYS`](#update_zsh_days) + - [`':omz:update' mode`](#omzupdate-mode) + - [`':omz:update' frequency`](#omzupdate-frequency) + - [Deprecated settings](#deprecated-settings) - [Completion settings](#completion-settings) - [`ZSH_COMPDUMP`](#zsh_compdump) - [`ZSH_DISABLE_COMPFIX`](#zsh_disable_compfix) @@ -98,34 +98,71 @@ ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/ohmyzsh" ## Update settings -### `DISABLE_AUTO_UPDATE` +### `':omz:update' mode` -If this option is set, Oh My Zsh will not try to update regularly and you'll -have to update it manually, whenever you want, by running `omz update`. +This setting controls which automatic update mode to use. These are the available modes: + +1. `disabled`: disables all automatic updates. + + ```zsh + zstyle ':omz:update' mode disabled + ``` + +2. `auto`: automatically updates Oh My Zsh when a new version is available, without asking for confirmation. + + ```zsh + zstyle ':omz:update' mode auto + ``` + +3. `reminder`: only checks if there are updates available and shows a reminder to update Oh My Zsh. + + ```zsh + zstyle ':omz:update' mode reminder + ``` + +4. `prompt`: it asks for confirmation before updating Oh My Zsh. This is the default mode, **so you don't need to set it** (just delete the zstyle setting if you've changed it before). + +### `':omz:update' frequency` + +This setting tells Oh My Zsh how often should automatic updates happen (**in days**). This +setting only takes effect when automatic updates are enabled. **The default are 13 days.** ```zsh -DISABLE_AUTO_UPDATE=true +# Check for updates every 7 days +zstyle ':omz:update' frequency 7 ``` -### `DISABLE_UPDATE_PROMPT` +### Deprecated settings -If [automatic updates aren't disabled](#disable_auto_update), the confirmation prompt -will not appear, and instead Oh My Zsh will update without asking whenever the automatic -update expires. +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. -```zsh -DISABLE_UPDATE_PROMPT=true -``` + -### `UPDATE_ZSH_DAYS` +- `DISABLE_AUTO_UPDATE=true`: if set, it has the same effect as setting +[**`disabled` mode** in the new zstyle format](#omzupdate-mode). Instead, use: -This setting tells Oh My Zsh how often should automatic updates happen (in days). This -setting doesn't have any effect if [automatic updates are disabled](#disable_auto_update). + ```zsh + zstyle ':omz:update' mode disabled + ``` -```zsh -# The default is 13 days -UPDATE_ZSH_DAYS=13 -``` + + +- `DISABLE_UPDATE_PROMPT=true`: if set, it has the same effect as setting +[**`auto` mode** in the new zstyle format](#omzupdate-mode). Instead, use: + + ```zsh + zstyle ':omz:update' mode auto + ``` + + + +- `UPDATE_ZSH_DAYS=`: if set, it has the same effect as setting +[**`frequency `** in the new zstyle format](#omzupdate-frequency). Instead, use: + + ```zsh + zstyle ':omz:update' frequency + ``` ## Completion settings