5 Commits

Author SHA1 Message Date
Robby Russell
84429a7229 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
2026-06-12 11:34:27 -07:00
ANDI FAUZAN HEDIANTORO
5181447da8 fix(deno): remove deprecated aliases and add modern ones (#13796)
- Remove  alias for  (deprecated in Deno 1.x, removed
  in Deno 2.0)
- Remove  alias for  (the --unstable flag
  has been deprecated in favor of granular --unstable-* flags)
- Add  alias for  (type-check without running)
- Add  alias for  (HTTP server introduced in Deno 1.37)
- Update README to reflect changes
2026-06-12 10:39:09 -07:00
Felipe Santos
c954bbb168 feat(websearch)!: rename grok to grokcom (#13792)
BREAKING CHANGE: Rename `grok` alias to `grokcom` to avoid conflicts with Grok Build CLI.
2026-06-10 10:56:28 +02:00
dependabot[bot]
630a7c04c3 chore(deps): bump github/codeql-action from 4.36.0 to 4.36.2 (#13803)
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 09:12:39 +02:00
dependabot[bot]
e25f96735e chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 (#13804)
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 09:12:20 +02:00
11 changed files with 55 additions and 26 deletions

View File

@@ -21,7 +21,7 @@ jobs:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Authenticate as @ohmyzsh

View File

@@ -31,7 +31,7 @@ jobs:
egress-policy: audit
- name: Set up git repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install zsh
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install zsh
@@ -52,7 +52,7 @@ jobs:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install Vercel CLI
run: npm install -g vercel
- name: Setup project and deploy

View File

@@ -29,7 +29,7 @@ jobs:
egress-policy: audit
- name: Set up git repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install zsh
run: sudo apt-get update; sudo apt-get install zsh
- name: Check syntax

View File

@@ -41,7 +41,7 @@ jobs:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
@@ -60,6 +60,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
sarif_file: results.sarif

View File

@@ -466,6 +466,15 @@ zstyle ':omz:update' frequency 7
zstyle ':omz:update' frequency 0
```
By default, updates always pull the latest changes. If you'd rather let others kick the tires first
before an update reaches your machine, you can set a cooldown (in days). You'll still get everything —
just a little later:
```sh
# Only apply updates that are at least 10 days old
zstyle ':omz:update' cooldown 10
```
### Updates Verbosity
You can also limit the update verbosity with the following settings:

View File

@@ -4,17 +4,17 @@ This plugin sets up completion and aliases for [Deno](https://deno.land).
## Aliases
| Alias | Full command |
| ----- | ------------------- |
| db | deno bundle |
| dc | deno compile |
| dca | deno cache |
| dfmt | deno fmt |
| dh | deno help |
| dli | deno lint |
| drn | deno run |
| drA | deno run -A |
| drw | deno run --watch |
| dru | deno run --unstable |
| dts | deno test |
| dup | deno upgrade |
| Alias | Full command |
| ----- | ---------------- |
| dc | deno compile |
| dca | deno cache |
| dck | deno check |
| dfmt | deno fmt |
| dh | deno help |
| dli | deno lint |
| drn | deno run |
| drA | deno run -A |
| drw | deno run --watch |
| dsv | deno serve |
| dts | deno test |
| dup | deno upgrade |

View File

@@ -1,14 +1,14 @@
# ALIASES
alias db='deno bundle'
alias dc='deno compile'
alias dca='deno cache'
alias dck='deno check'
alias dfmt='deno fmt'
alias dh='deno help'
alias dli='deno lint'
alias drn='deno run'
alias drA='deno run -A'
alias drw='deno run --watch'
alias dru='deno run --unstable'
alias dsv='deno serve'
alias dts='deno test'
alias dup='deno upgrade'

View File

@@ -53,7 +53,7 @@ Available search contexts are:
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
| `chatgpt` | `https://chatgpt.com/?q=` |
| `claudeai` | `https://claude.ai/new?q=` |
| `grok` | `https://grok.com/?q=` |
| `grokcom` | `https://grok.com/?q=` |
| `reddit` | `https://www.reddit.com/search/?q=` |
| `ppai` | `https://www.perplexity.ai/search/new?q=` |
| `rscrate` | `https://crates.io/search?q=` |

View File

@@ -93,7 +93,7 @@ alias npmpkg='web_search npmpkg'
alias packagist='web_search packagist'
alias gopkg='web_search gopkg'
alias chatgpt='web_search chatgpt'
alias grok='web_search grok'
alias grokcom='web_search grok'
alias claudeai='web_search claudeai'
alias reddit='web_search reddit'
alias ppai='web_search ppai'

View File

@@ -28,9 +28,12 @@ ZSH_THEME="robbyrussell"
# 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).
# Uncomment the following line to change the frequency the auto-updater is run (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line to set how old an update must be before it's applied, manually or via the auto-updater (in days).
# zstyle ':omz:update' cooldown 10
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

View File

@@ -231,6 +231,10 @@ local ret=0
remote=${"$(git config --local oh-my-zsh.remote)":-origin}
branch=${"$(git config --local oh-my-zsh.branch)":-master}
# cooldown: minimum age (in days) of commits to apply
local cooldown_days
zstyle -s ':omz:update' cooldown cooldown_days || cooldown_days=0
# repository state
last_head=$(git symbolic-ref --quiet --short HEAD || git rev-parse HEAD)
# checkout update branch
@@ -242,7 +246,20 @@ last_commit=$(git rev-parse "$branch")
if [[ $verbose_mode != silent ]]; then
printf "${BLUE}%s${RESET}\n" "Updating Oh My Zsh"
fi
if LANG= git pull --quiet --rebase $remote $branch; then
if {
if (( cooldown_days > 0 )); then
zmodload zsh/datetime
local cutoff_epoch cooldown_ref
cutoff_epoch=$(( EPOCHSECONDS - cooldown_days * 86400 ))
LANG= git fetch --quiet $remote $branch && {
cooldown_ref=$(git log --format="%H %ct" "$remote/$branch" \
| awk -v c="$cutoff_epoch" '$2 <= c { print $1; exit }')
[[ -z "$cooldown_ref" ]] || LANG= git merge --ff-only --quiet "$cooldown_ref"
}
else
LANG= git pull --quiet --rebase $remote $branch
fi
}; then
# Check if it was really updated or not
if [[ "$(git rev-parse HEAD)" = "$last_commit" ]]; then
message="Oh My Zsh is already at the latest version."