mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
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 <mvdoster@gmail.com>
This commit is contained in:
parent
9a2898ba2a
commit
cc3baf395f
1
_zinit
1
_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
|
||||
} # ]]]
|
||||
|
|
|
|||
|
|
@ -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 ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue