* feat(updater): add cooldown option to delay applying updates (#13813)
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
* fix(updater): address cooldown review feedback
Pass cooldown into upgrade.sh as -c, extract the update helpers, and only
prompt when a cooldown-eligible commit would actually move HEAD.
* fix(updater): follow first-parent history for cooldown
* Create go_prompt_info to add go version to prompts
* golang: move go_prompt_info to plugin, guard and quote output
Addresses review feedback: the prompt helper only belongs to Go
developers, so it moves out of lib/ (sourced for every shell) into
plugins/golang/golang.plugin.zsh. Adds a $+commands[go] guard so
users without Go installed don't spawn a process or see a stderr
error on every prompt render, quotes the version output the same
way the rvm/nvm helpers do so a % can't be read as a prompt escape,
and adds the dummy go_prompt_info stub to
lib/prompt_info_functions.zsh for themes that call it when the
plugin isn't loaded.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193G8TyNqmNnv6v9HsVafGa
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
The convention to use `.venv` or `venv` directories for Python virtualenvs is widespread.
This directory is huge and gives very little value when grepping in a source code directory.
Co-authored-by: Marc Cornellà <marc@mcornella.com>
Logic error in `history -c` when prompting for confirmation caused history
to be deleted when typing anything but explicitly `n`, `N`, or sending `\n`.
New logic prevents deletion by pressing wrong key and only deletes
history when sending `y` or `Y`.
Co-authored-by: Sargates <nicholas.g.glenn@gmail.com>
We removed this mitigation in 0c80a063 because of an assumption
that the issue had been fixed, but it looks like zsh < 5.0.6 has
other issues (see #12360), so we need to disable it for real.
Fixes#12360