Introduces a new `zstyle ':omz:update' cooldown <days>` setting that limits
the updater to only apply commits that are at least N days old. Defaults to 0
(current behavior — always pull latest).
When cooldown is set, the updater fetches the remote branch and finds the most
recent commit whose committer timestamp is at least N days old, then applies it
via `git merge --ff-only`. If the local copy is already at or past the cooldown
ref, nothing changes.
- tools/upgrade.sh: reads cooldown zstyle, replaces git pull with fetch +
merge --ff-only when cooldown > 0
- README.md: documents the new setting under "Getting Updates"
- templates/zshrc.zsh-template: adds commented-out cooldown example alongside
frequency, with rephrased comments to clarify how the two work together
I noticed this option was missing from the template. When I followed the directions in README to enable it, I put it below line 59 without noticing it wouldn't have any effect by then. Prevent others from making a rookie mistake like mine.
By convention, user-specific aliases are kept in each user's .zshrc
file. The .zshrc template provided by oh-my-zsh has an area for example
aliases, though these were being loaded before other aliases in libs, plugins,
and themes. As a result, personal aliases could be overwritten by these
other aliases as they are loaded. To make personal customization easier, the
sample aliases section of the .zshrc template has been moved to the area
dedicated for personal customization. This section of the configuration
is processed after all other items are loaded, preventing personal aliases
and exports from being inadvertently clobbered by oh-my-zsh.
Since commands auto-correction must be explicitly enable with
the ENABLE_CORRECTION envvar, this commit replaces the unaccurate
example in the zshrc template.
Although the zshrc template adds a PATH= string, this is overwritten by the installer script.
This allows it to be placed anywhere in the file instead of having to append at the end.
In this commit, the option only works for git but it should not be to hard for
someone who knows svn to so the same.
This commit is largely inspired by @yoavweiss, I only added an option to use
it.