From 109279fc596cb2344e7047a027712d83ccb3f79e Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Thu, 31 Oct 2019 22:48:45 -0500 Subject: [PATCH] Indent git log in zimfw update --- src/tools/update.zsh.erb | 7 +++++-- zimfw.zsh | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/tools/update.zsh.erb b/src/tools/update.zsh.erb index 1140a64..7bb023f 100644 --- a/src/tools/update.zsh.erb +++ b/src/tools/update.zsh.erb @@ -49,8 +49,11 @@ if [[ ${TYPE} == branch ]]; then else OUT="Updating to ${TYPE} ${REV}" fi -[[ -n ${LOG} ]] && OUT="${OUT} -${LOG}" +if [[ -n ${LOG} ]]; then + LOG_LINES=(' '${(f)^LOG}) + OUT="${OUT} +${(F)LOG_LINES}" +fi if ERR=$(command git submodule update --init --recursive -q 2>&1); then if [[ ${OPT} != -q ]]; then print -R "$(print -P "${CLEAR_LINE}%F{green}✓%f") ${MODULE}: ${OUT}" diff --git a/zimfw.zsh b/zimfw.zsh index 27595a1..68483e0 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -182,7 +182,7 @@ _zimfw_clean_dumpfile() { } _zimfw_info() { - print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 3af566d)' + print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 601941f)' print "Zsh version: ${ZSH_VERSION}" print "System info: $(command uname -a)" } @@ -306,8 +306,11 @@ if [[ \${TYPE} == branch ]]; then else OUT=\"Updating to \${TYPE} \${REV}\" fi -[[ -n \${LOG} ]] && OUT=\"\${OUT} -\${LOG}\" +if [[ -n \${LOG} ]]; then + LOG_LINES=(' '\${(f)^LOG}) + OUT=\"\${OUT} +\${(F)LOG_LINES}\" +fi if ERR=\$(command git submodule update --init --recursive -q 2>&1); then if [[ \${OPT} != -q ]]; then print -R \"\$(print -P \"\${CLEAR_LINE}%F{green}✓%f\") \${MODULE}: \${OUT}\"