Fix git log in zimfw update not showing backtick
because it was being processed as the beginning of a escape sequence. Using `print -R` fixes that. Probably a good idea to use it when printing other messages that contain externally-generated output.
This commit is contained in:
parent
1980ca091d
commit
e7ba68511a
2 changed files with 7 additions and 5 deletions
|
@ -49,10 +49,11 @@ if [[ ${TYPE} == branch ]]; then
|
||||||
else
|
else
|
||||||
OUT="Updating to ${TYPE} ${REV}"
|
OUT="Updating to ${TYPE} ${REV}"
|
||||||
fi
|
fi
|
||||||
[[ -n ${LOG} ]] && OUT="${OUT}\n${LOG}"
|
[[ -n ${LOG} ]] && OUT="${OUT}
|
||||||
|
${LOG}"
|
||||||
if ERR=$(command git submodule update --init --recursive -q 2>&1); then
|
if ERR=$(command git submodule update --init --recursive -q 2>&1); then
|
||||||
if [[ ${OPT} != -q ]]; then
|
if [[ ${OPT} != -q ]]; then
|
||||||
print -P "${CLEAR_LINE}%F{green}✓%f ${MODULE}: ${OUT}"
|
print -R "$(print -P "${CLEAR_LINE}%F{green}✓%f") ${MODULE}: ${OUT}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
print -P "${CLEAR_LINE}%F{red}✗ ${MODULE}: Error (4)%f\n${ERR}"
|
print -P "${CLEAR_LINE}%F{red}✗ ${MODULE}: Error (4)%f\n${ERR}"
|
||||||
|
|
|
@ -182,7 +182,7 @@ _zimfw_clean_dumpfile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is a1291c5)'
|
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 3af566d)'
|
||||||
print "Zsh version: ${ZSH_VERSION}"
|
print "Zsh version: ${ZSH_VERSION}"
|
||||||
print "System info: $(command uname -a)"
|
print "System info: $(command uname -a)"
|
||||||
}
|
}
|
||||||
|
@ -306,10 +306,11 @@ if [[ \${TYPE} == branch ]]; then
|
||||||
else
|
else
|
||||||
OUT=\"Updating to \${TYPE} \${REV}\"
|
OUT=\"Updating to \${TYPE} \${REV}\"
|
||||||
fi
|
fi
|
||||||
[[ -n \${LOG} ]] && OUT=\"\${OUT}\n\${LOG}\"
|
[[ -n \${LOG} ]] && OUT=\"\${OUT}
|
||||||
|
\${LOG}\"
|
||||||
if ERR=\$(command git submodule update --init --recursive -q 2>&1); then
|
if ERR=\$(command git submodule update --init --recursive -q 2>&1); then
|
||||||
if [[ \${OPT} != -q ]]; then
|
if [[ \${OPT} != -q ]]; then
|
||||||
print -P \"\${CLEAR_LINE}%F{green}✓%f \${MODULE}: \${OUT}\"
|
print -R \"\$(print -P \"\${CLEAR_LINE}%F{green}✓%f\") \${MODULE}: \${OUT}\"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
print -P \"\${CLEAR_LINE}%F{red}✗ \${MODULE}: Error (4)%f\n\${ERR}\"
|
print -P \"\${CLEAR_LINE}%F{red}✗ \${MODULE}: Error (4)%f\n\${ERR}\"
|
||||||
|
|
Loading…
Reference in a new issue