mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
fix: debug logging logic and format (#592)
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
parent
2a59b1ddc6
commit
3c7e5be07d
|
|
@ -94,7 +94,7 @@ ____
|
|||
|
||||
____
|
||||
|
||||
Has 87 line(s). Calls functions:
|
||||
Has 89 line(s). Calls functions:
|
||||
|
||||
.zinit-compile-plugin
|
||||
|-- zinit-side.zsh/.zinit-compute-ice
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ PRECMD-HOOK @zinit-scheduler
|
|||
|
||||
==== Script Body
|
||||
|
||||
Has 244 line(s). Calls functions:
|
||||
Has 245 line(s). Calls functions:
|
||||
|
||||
Script-Body
|
||||
|-- +zi-log
|
||||
|
|
|
|||
|
|
@ -832,7 +832,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
|
|||
|
||||
# when from"gh-r" ice set, skip compile unless compile ice is set
|
||||
if [[ ${ICE[from]} = gh-r ]] && (( ${+ICE[compile]} == 0 )); then
|
||||
+zi-log '{d} from"gh-r" detected, skipping compile'
|
||||
+zi-log '{dbg} from"gh-r" detected, skipping compile'
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
|
@ -905,6 +905,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
|
|||
+zi-log -n "{m} {num}${#list}{rst} compiled file${=${list:#1}:+s} added to {var}\$ADD_COMPILED{rst} array"
|
||||
if (( retval )) {
|
||||
+zi-log " (exit code: {ehi}$retval{rst})"
|
||||
} else {
|
||||
+zi-log ' '
|
||||
}
|
||||
}
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ if [[ -z $SOURCED && ( ${+terminfo} -eq 1 && -n ${terminfo[colors]} ) || ( ${+te
|
|||
|
||||
col-i $'\e[1m\e[38;5;82m'"==>"$'\e[0m' col-e $'\e[1m\e[38;5;204m'"Error: "$'\e[0m'
|
||||
col-m $'\e[1m\e[38;5;135m'"==>"$'\e[0m' col-w $'\e[1;38;5;214m'"Warning: "$'\e[0m'
|
||||
col-dbg $'\e[2m\e[38;47;108m'"[debug]"$'\e[0m'
|
||||
|
||||
col--… "${${${(M)LANG:#*UTF-8*}:+⋯⋯}:-···}" col-lr "${${${(M)LANG:#*UTF-8*}:+↔}:-"«-»"}"
|
||||
col-ndsh "${${${(M)LANG:#*UTF-8*}:+–}:-}" col-… "${${${(M)LANG:#*UTF-8*}:+…}:-...}"
|
||||
|
|
@ -1977,7 +1978,7 @@ builtin setopt noaliases
|
|||
builtin emulate -L zsh -o extendedglob
|
||||
REPLY=
|
||||
if (( ZINIT[DEBUG] )); then
|
||||
REPLY=$1
|
||||
REPLY="$ZINIT[col-dbg]$1"
|
||||
fi
|
||||
} # ]]]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue