Skip to content

Show plugin update diffs without git's pager - #13345

Open
elberacasa wants to merge 1 commit into
omacom:quattrofrom
elberacasa:plugin-update-no-pager
Open

elberacasa wants to merge 1 commit into
omacom:quattrofrom
elberacasa:plugin-update-no-pager

Conversation

@elberacasa

@elberacasa elberacasa commented Sep 26, 2026 •

Copy link
Copy Markdown

Reopens #12335, which closed when I deleted my fork by accident. The same change, --no-pager on the non-delta branch with a comment saying why, rebased on current quattro. Tracking issue: #12332.

omarchy plugin update <id> prints the diff with an unpiped git diff, so git starts its pager whenever output goes to a terminal. With git's default LESS=FRX, less quits by itself on a diff that fits the screen; a longer diff, which a plugin a few versions behind produces, or a LESS without F, or a custom pager, keeps it open. The gum confirm "Update <id>?" that follows then waits behind the pager, invisible: Enter scrolls one line inside less, so the update looks stuck with nothing to suggest a keypress is expected. Quitting with q reveals the prompt.

On the delta path the diff is piped, which makes git skip its pager, so the prompt is already visible there. --no-pager gives the other path the same behaviour.

Why this is the default path, not an edge case

git-delta is in neither depends nor optdepends of the omarchy package, while git is. Confirmed on 4.0.4-1.

What @Lifferado found on top of it, in #12335

It is also reached through omarchy update when a user's own post-update.d hook calls omarchy-plugin-update (no shipped hook does at this head; #10326 would call it from attended omarchy update runs), so the update parks at an invisible pager. omarchy-update holds a root systemd-inhibit --what=sleep:idle --mode=block for its duration, and closing the terminal there leaves that inhibitor behind: the machine stops suspending and idle-locking, with the cause several steps removed from an update that merely looked like it failed.

Verification

Omarchy 4.0.4-1, gum 2.0.0-1, delta not installed, default core.pager. With a throwaway plugin whose upstream is one commit ahead, run in a real terminal with GIT_PAGER set to announce itself:

Result
Before git started a pager; the confirmation never appeared
After no pager; the diff printed straight to the terminal and the confirmation followed

shellcheck is clean on the changed file. test/cli has one failure, vscode generated theme references current theme file, which fails the same way on an unpatched checkout here.

bin/omarchy-plugin-add prints no diff, and the other git log calls in bin/ run inside command substitution, where git never pages, so this remains the only place affected.

Fixes #12332

@llstrk

llstrk commented Sep 27, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Verified: no problems found. --no-pager makes git set GIT_PAGER=cat (git.c), which git_pager() checks before core.pager and PAGER (pager.c). setup_diff_pager() goes through the same function even when pager.diff is set. The diff still prints in colour on a terminal, and the gum confirm prompt follows at once.

The script was run in a 24x80 pseudo-terminal with git 2.55.0, less 704 and gum 2.0.0, against a synthetic plugin whose upstream was one commit ahead:

case (no delta)                              base                             head
200-line diff, LESS unset                    less stays open, prompt hidden   no pager, prompt visible
short diff, LESS=R                           less stays open, prompt hidden   no pager, prompt visible
200 lines, GIT_PAGER=less                    prompt hidden until q            no pager, prompt visible
200 lines, core.pager/pager.diff=less -+F    prompt hidden until q            no pager, prompt visible
200 lines, under script -qefc                prompt hidden until q            no pager, prompt visible

In the head runs, y fast-forwarded the plugin. With a cat stub standing in for delta, git's output is piped and git starts no pager in either version. With stdout piped and no --yes, both versions print the diff and then refuse the same way. With --yes the diff is skipped entirely, so the change does not apply.

Smaller notes


Review information

Test scope: source review of bin/omarchy-plugin-update, its callers and hook runner, and git 2.55.0 pager source. Isolated pseudo-terminal runs of the base and head script with real git, less and gum, a delta stub and stubbed plugin validation and shell rescan. Not run: a real terminal emulator, real delta, shellcheck, test/cli, or a live omarchy update. The inhibitor claim was checked in source only, not the effect of closing the terminal.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@elberacasa
elberacasa force-pushed the plugin-update-no-pager branch from 552b1dd to 4ecd694 Compare September 28, 2026 14:21
@elberacasa

Copy link
Copy Markdown
Author

Thank you for the source trace and the matrix; both notes are fair.

Premise precision. You are right, and the comment now says it: with LESS unset git sets LESS=FRX for the pager, so less quits by itself on a diff that fits the screen, and what hides the prompt is a long diff, a LESS without F, or a custom pager. Pushed as git -C "$dir" --no-pager diff HEAD FETCH_HEAD with the comment reading "Without --no-pager git pages a long diff, hiding the confirmation below it." My own report was from a real update spanning two releases, which is exactly the long-diff case, and a plugin that has drifted a few versions is the common one.

The omarchy update path. Also fair: no shipped hook at this head calls omarchy-plugin-update, so that route needs a user's own hook today. Worth keeping in view that #7136 and #6777 would both reach this command from an update or a menu entry, and a caller without --yes still stops for input, which is far better at a visible prompt than behind a pager.

Overlapping PRs. Noted, thank you: #10711, #10248 and #11242 rewrite or move the same else branch. Whichever lands after this one needs to keep --no-pager, and I am happy for this to be dropped in favour of any of them that carries it.

@llstrk

llstrk commented Oct 1, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: No defects found at 4ecd694.

Follow-up to the earlier review and reply; since 552b1dd only the code comment changed.

Earlier notes:

Details

Pseudo-terminal runs (24x80, git 2.55.0, less 704, gum 2.0.0, delta branch forced off, synthetic plugin one commit behind upstream):

lines replaced, setup                        base                         head
3, LESS unset                                less quits, prompt visible   no pager, prompt visible
100, LESS unset                              prompt hidden until q        no pager, prompt visible
3, LESS=R                                    prompt hidden until q        no pager, prompt visible
3, core.pager and pager.diff = less -+F      prompt hidden until q        no pager, prompt visible

At the head, answering y updated the plugin, and git's colour was kept.

  • Report git-managed plugins that are behind their origin #10326: merges cleanly into current quattro. Its bin/omarchy-update calls omarchy-plugin-update || true only when OMARCHY_UPDATE_UNATTENDED is unset, so omarchy update -y skips it.
  • Install the marketplace-verified snapshot by default in plugin add #11242: has a second plain git diff, in its new pin_to_commit() path. All three conflict with this PR in bin/omarchy-plugin-update.
  • Unchanged files: bin/omarchy-plugin-update, bin/omarchy-update and bin/omarchy-hook are unchanged between this PR's parent and current quattro; the --no-pager line is identical to 552b1dd.
  • Optional: the PR description still says "Same one-word change" and that a post-update.d hook calls omarchy-plugin-update. The reply now says such a hook would be a user's own. Updating the description would keep both in line for a reader who skips the thread.

Review information

Test scope: Source review and sandboxed pseudo-terminal runs at 4ecd694; not run in a real terminal, with real delta, or via a live omarchy update.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 3, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 4ecd694. The bug is real, and this fixes it. Nothing to change.

Reproduced on an Omarchy worker (git 2.55.0, less 704, gum 2.0.0, no delta). I ran the script on a 24x80 pseudo-terminal against a throwaway plugin one commit behind its upstream, answering n to the prompt:

200-line diff, LESS unset 3-line diff, LESS unset 3-line diff, LESS=R
quattro pager opens, n goes to less, hangs until killed pager quits, prompt answered pager opens, hangs
this PR no pager, prompt drawn and answered same same
this PR with --no-pager taken out hangs, same as quattro prompt answered hangs

A short diff with the default LESS=FRX was never affected, which is what the PR says. One small wording point that changes nothing in the fix: the gum confirm isn't waiting behind the pager. The script is sequential, so the prompt only starts once git and its pager exit. To the user it looks the same.

Suite: ./test/cli on the worker has one failure, vscode generated theme references current theme file, and it fails the same way on quattro without this change. That failure is the only reason this isn't marked ready.

Scope: it's one flag, on the only path that reaches the confirmation through git's pager. The delta path already pipes to delta --paging=never, and --yes skips the diff entirely. #10711, #10248 and #11242 rewrite this same else branch with a plain git diff, so whichever of them lands after this needs to keep --no-pager. I've linked #12332 so it closes when this merges.

Second opinion: Codex Medium reviewed the diff and the surrounding code and found no defects. It made the prompt-ordering point above, and it noted that --no-pager bypasses a user's core.pager or pager.diff for this one command, which is intended. Independence isn't guaranteed: it can read this session's notes.

Waiting on the maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy plugin update hides its confirm prompt behind git's pager when delta is not installed

3 participants