From a85e9dcc3ee2beebf3947ef6091ccd540d94f6f3 Mon Sep 17 00:00:00 2001 From: Vladislav Doster Date: Mon, 31 Aug 2026 15:50:14 -0500 Subject: [PATCH] fix(self-update): honor -q in changelog display When the checkout is behind upstream, the commit-log display piped through .zinit-pager unconditionally, so self-update -q (and the quiet .zinit-self-update call made by update --all) could hang in less until dismissed. Skip the display, munging included, under --quiet. Signed-off-by: Vladislav Doster --- zinit-autoload.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zinit-autoload.zsh b/zinit-autoload.zsh index ee3893f4..6ce40e63 100644 --- a/zinit-autoload.zsh +++ b/zinit-autoload.zsh @@ -2005,7 +2005,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}" builtin cd -q "$ZINIT[BIN_DIR]" \ && lines=( ${(f)"$(command git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset || %b' ..@\{u\})"} ) # Use '..@{u}' which refers to the configured upstream branch, instead of '..origin/HEAD' - if (( ${#lines} > 0 )); then + if (( ${#lines} > 0 && ! OPTS[opt_-q,--quiet] )); then # Remove the (origin/main ...) segments, to expect only tags to appear lines=( "${(S)lines[@]//\(([,[:blank:]]#(origin|HEAD|master|main)[^a-zA-Z]##(HEAD|origin|master|main)[,[:blank:]]#)#\)/}" ) # Remove " ||" if it ends the line (i.e. no additional text from the body)