From 602d9e9d1cb13a9dd032f700a9cde6a5f49e7da6 Mon Sep 17 00:00:00 2001 From: Vladislav Doster Date: Sun, 11 Feb 2024 02:21:46 -0600 Subject: [PATCH] fix: [un]compile usage message Signed-off-by: Vladislav Doster --- zinit.zsh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/zinit.zsh b/zinit.zsh index df28868f5..28a02ba0b 100644 --- a/zinit.zsh +++ b/zinit.zsh @@ -3064,20 +3064,19 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice ;; (compile|uncompile) (( ${+functions[.zinit-compile-plugin]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1 - local action="$1" + local action="$1" all help quiet shift - # setopt localoptions noksharrays - local help all quiet - zparseopts -D -F -K -- \ - {h,-help}=help \ - {q,-quiet}=quiet \ - {a,-all}=all \ - || return + zparseopts -D -F -K -- {a,-all}=all {h,-help}=help {q,-quiet}=quiet || return if (( $#help )); then print -rC1 -- \ - "$0 [-h|--help]" \ - "$0 [-v|--verbose] [-f|--file=] []" - return + "Usage: zinit $action [OPTIONS]" \ + " " \ + "Remove unused data" \ + " " \ + "Options:" \ + " -a, --all Remove all unused images not just dangling ones" \ + " -f, --force Do not prompt for confirmation" + return 0 fi if (( $#all )); then .zinit-compile-uncompile-all ${action} @@ -3087,7 +3086,6 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice .zinit-${action}-plugin "$f" done fi - return 0 (debug) shift; (( ${+functions[+zinit-debug]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-additional.zsh"