mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
feat: update output messaging to be more informative
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
parent
23c47e1973
commit
047320a923
|
|
@ -711,14 +711,14 @@ ZINIT[EXTENDED_GLOB]=""
|
|||
emulate -LR zsh
|
||||
setopt extendedglob typesetsilent warncreateglobal
|
||||
|
||||
[[ $1 = -q ]] && +zinit-message "{info2}Updating Zinit{…}{rst}"
|
||||
[[ $1 = -q ]] && +zinit-message -n "{info2}[self-update]{info2}{msg2} Updating Zinit repository{msg2}" \
|
||||
|
||||
local nl=$'\n' escape=$'\x1b['
|
||||
local current_branch=$(builtin pushd $ZINIT[BIN_DIR] > /dev/null && git branch --show-current && popd > /dev/null)
|
||||
local -a lines
|
||||
(
|
||||
builtin cd -q "$ZINIT[BIN_DIR]" \
|
||||
&& +zinit-message -n "{pre}[self-update]{msg2} fetching changes for {msg2}$current_branch$nl{cmd}" \
|
||||
&& +zinit-message -n "{pre}[self-update]{msg2} fetching latest changes from {msg2}$current_branch$nl{cmd}" \
|
||||
&& command git fetch --quiet \
|
||||
&& lines=( ${(f)"$(command git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset || %b' ..FETCH_HEAD)"} )
|
||||
if (( ${#lines} > 0 )); then
|
||||
|
|
@ -743,14 +743,14 @@ ZINIT[EXTENDED_GLOB]=""
|
|||
}
|
||||
)
|
||||
if [[ $1 != -q ]] {
|
||||
+zinit-message "Compiling Zinit (zcompile){…}"
|
||||
+zinit-message -n "{pre}[self-update]{msg2} compiling zinit (zinit){msg2}"
|
||||
}
|
||||
command rm -f $ZINIT[BIN_DIR]/*.zwc(DN)
|
||||
zcompile -U $ZINIT[BIN_DIR]/zinit.zsh
|
||||
zcompile -U $ZINIT[BIN_DIR]/zinit-{'side','install','autoload','additional'}.zsh
|
||||
zcompile -U $ZINIT[BIN_DIR]/share/git-process-output.zsh
|
||||
# Load for the current session
|
||||
[[ $1 != -q ]] && +zinit-message "Reloading Zinit for the current session{…}"
|
||||
[[ $1 != -q ]] && +zinit-message -n "{pre}[self-update]{msg2} Reloading Zinit for the current session{msg2}"
|
||||
source $ZINIT[BIN_DIR]/zinit.zsh
|
||||
zcompile -U $ZINIT[BIN_DIR]/zinit-{'side','install','autoload'}.zsh
|
||||
# Read and remember the new modification timestamps
|
||||
|
|
|
|||
Loading…
Reference in a new issue