@@ -584,16 +584,17 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
584584 fi
585585 done
586586
587- if (( quiet == 1 && (${#INSTALLED_COMPS} || ${#SKIPPED_COMPS}) )) {
588- +zinit-message "{msg}Installed {num}${#INSTALLED_COMPS}" \
589- "{msg}completions. They are stored in the{var}" \
590- "\$INSTALLED_COMPS{msg} array."
591- if (( ${#SKIPPED_COMPS} )) {
592- +zinit-message "{msg}Skipped installing" \
593- "{num}${#SKIPPED_COMPS}{msg} completions." \
594- "They are stored in the {var}\$SKIPPED_COMPS{msg} array."
595- }
596- }
587+ local comps msg
588+ local -A comp_types=(\$INSTALLED_COMPS 'Installed' \$SKIPPED_COMPS 'Skipped re-installing')
589+ for comps msg in ${(kv)comp_types}; do
590+ local comps_num=${#${(e)comps}}
591+ if (( comps_num > 0 )); then
592+ +zinit-message "{m} ${msg} {num}$comps_num{rst} completion${=${comps_num:#1}:+s}"
593+ if (( quiet == 0 )); then
594+ +zinit-message "{m} Added $comps_num completion${=${comps_num:#1}:+s} to {var}$comps{rst} array"
595+ fi
596+ fi
597+ done
597598
598599 if (( ZSH_SUBSHELL )) {
599600 builtin print -rl -- $INSTALLED_COMPS >! ${TMPDIR:-/tmp}/zinit.installed_comps.$$.lst
@@ -847,12 +848,12 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
847848 if [[ -f $plugin_dir/$filename ]] {
848849 reply=( "$plugin_dir" $plugin_dir/$filename )
849850 } elif { ! .zinit-first % "$plugin_dir" } {
850- +zinit-message "No files for compilation found. "
851+ +zinit-message "{m} No files for compilation found"
851852 return 1
852853 }
853854 } else {
854855 .zinit-first "$1" "$2" || {
855- +zinit-message "No files for compilation found. "
856+ +zinit-message "{m} No files for compilation found"
856857 return 1
857858 }
858859 }
@@ -861,15 +862,15 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
861862 first=${reply[-1]}
862863 local fname=${first#$pdir_path/}
863864
864- +zinit-message -n "{note}Note:{rst} Compiling{ehi}:{rst} {b}{ file}$fname{rst}{… }"
865+ +zinit-message -n "{m} Compiling { file}$fname{rst}"
865866 if [[ -z ${ICE[(i)(\!|)(sh|bash|ksh|csh)]} ]] {
866867 () {
867868 builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace}
868869 if { ! zcompile -U "$first" } {
869870 +zinit-message "{msg2}Warning:{rst} Compilation failed. Don't worry, the plugin will work also without compilation."
870871 +zinit-message "{msg2}Warning:{rst} Consider submitting an error report to Zinit or to the plugin's author."
871872 } else {
872- +zinit-message " {ok }OK{rst}. "
873+ +zinit-message " [{happy }OK{rst}] "
873874 }
874875 # Try to catch possible additional file
875876 zcompile -U "${${first%.plugin.zsh}%.zsh-theme}.zsh" 2>/dev/null
@@ -886,7 +887,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
886887 eval "list+=( \$plugin_dir/$~pat(N) )"
887888 }
888889 if [[ ${#list} -eq 0 ]] {
889- +zinit-message "{u-warn}Warning{b-warn}:{rst } ice {ice}compile{apo}''{rst} didn't match any files."
890+ +zinit-message "{w } ice {ice}compile{apo}''{rst} didn't match any files."
890891 } else {
891892 integer retval
892893 for first in $list; do
@@ -896,13 +897,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
896897 }
897898 done
898899 builtin print -rl -- ${list[@]#$plugin_dir/} >! ${TMPDIR:-/tmp}/zinit.compiled.$$.lst
900+ +zinit-message -n "{m} {num}${#list}{rst} compiled file${=${list:#1}:+s} added to {var}\$ADD_COMPILED{rst} array"
899901 if (( retval )) {
900- +zinit-message "{note}Note:{rst} The additional {num}${#list}{rst} compiled files" \
901- "are listed in the {var}\$ADD_COMPILED{rst} array (operation exit" \
902- "code: {ehi}$retval{rst})."
903- } else {
904- +zinit-message "{note}Note:{rst} The additional {num}${#list}{rst} compiled files" \
905- "are listed in the {var}\$ADD_COMPILED{rst} array."
902+ +zinit-message " (exit code: {ehi}$retval{rst})"
906903 }
907904 }
908905 fi
0 commit comments