1
0
Fork 0
mirror of synced 2024-11-22 15:25:34 -05:00

Be careful with multiple variables in the same line

as one cannot depend on the other.
This commit is contained in:
Eric Nielsen 2021-08-09 22:28:13 -05:00
parent f6b623f515
commit 35cd6f5f23
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
2 changed files with 5 additions and 3 deletions

View file

@ -1,7 +1,8 @@
# This runs in a new shell
readonly ACTION=${1} MODULE=${2} DIR=${3} URL=${4} REV=${6} CLEAR_LINE=<%= clear_line %>
readonly -i PRINTLEVEL=${7}
readonly TEMP=.zdegit_${RANDOM} TARBALL_TARGET=${DIR}/${TEMP}_tarball.tar.gz INFO_TARGET=${DIR}/.zdegit
readonly TEMP=.zdegit_${RANDOM}
readonly TARBALL_TARGET=${DIR}/${TEMP}_tarball.tar.gz INFO_TARGET=${DIR}/.zdegit
print_error() {
print -u2 -PR ${CLEAR_LINE}"%F{red}<%= error %>%B${MODULE}:%b ${1}%f"${2:+$'\n'${(F):- ${(f)^2}}}

View file

@ -334,7 +334,7 @@ _zimfw_compile() {
}
_zimfw_info() {
print -R 'zimfw version: '${_zversion}' (built at 2021-08-10 01:21:11 UTC, previous commit is 6700933)'
print -R 'zimfw version: '${_zversion}' (built at 2021-08-10 03:26:13 UTC, previous commit is f6b623f)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
@ -421,7 +421,8 @@ _zimfw_run_tool() {
degit) zcmd="# This runs in a new shell
readonly ACTION=\${1} MODULE=\${2} DIR=\${3} URL=\${4} REV=\${6} CLEAR_LINE=$'\E[2K\r'
readonly -i PRINTLEVEL=\${7}
readonly TEMP=.zdegit_\${RANDOM} TARBALL_TARGET=\${DIR}/\${TEMP}_tarball.tar.gz INFO_TARGET=\${DIR}/.zdegit
readonly TEMP=.zdegit_\${RANDOM}
readonly TARBALL_TARGET=\${DIR}/\${TEMP}_tarball.tar.gz INFO_TARGET=\${DIR}/.zdegit
print_error() {
print -u2 -PR \${CLEAR_LINE}\"%F{red}x %B\${MODULE}:%b \${1}%f\"\${2:+$'\n'\${(F):- \${(f)^2}}}