From cc3baf395fa51de11e7d76b11104e36d8d142601 Mon Sep 17 00:00:00 2001 From: Vladislav Doster Date: Mon, 31 Aug 2026 15:50:14 -0500 Subject: [PATCH] feat(self-update): support -n/--no-pager Issue #632: the pager machinery already recognized -n/--no-pager globally and .zinit-pager already honors OPTS[opt_-n,--no-pager], but self-update rejected the flag with "Incorrect options given". Allow it so the commit list can be printed straight to the terminal; help and error output pick the flag up automatically from the option map. Also offer the flag in the _zinit completion. Closes #632 Signed-off-by: Vladislav Doster --- _zinit | 1 + zinit.zsh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_zinit b/_zinit index b0359baf..02db0772 100644 --- a/_zinit +++ b/_zinit @@ -275,6 +275,7 @@ _zinit_run(){ _zinit_self_update(){ _arguments -A \ '(-h --help)'{-h,--help}'[Show this help message]' \ + '(-n --no-pager)'{-n,--no-pager}'[Disable the use of the pager]' \ '(-q --quiet)'{-q,--quiet}'[Turn off messages from the operation]' \ && ret=0 } # ]]] diff --git a/zinit.zsh b/zinit.zsh index 768cd982..13118d1b 100644 --- a/zinit.zsh +++ b/zinit.zsh @@ -2713,7 +2713,7 @@ zinit() { light "--help|-b|-h" snippet "--command|--force|--help|-f|-h|-x" times "--help|-h|-m|-s" - self-update "--help|--quiet|-h|-q" + self-update "--help|--no-pager|--quiet|-h|-n|-q" unload "--help|--quiet|-h|-q" update "--all|--help|--no-pager|--parallel|--plugins|--quiet|--reset|--snippets|--urge|--verbose|-L|-a|-h|-n|-p|-q|-r|-s|-u|-v" version ""