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

Use builtin cd -q

to bypass aliases and to avoid calling any chpwd hook functions.
This commit is contained in:
Eric Nielsen 2019-12-12 08:46:27 -05:00
parent eaebf1731c
commit 3ae4fec895
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
3 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ _zimfw_compile() {
zfile=(${zdir}/^(*.*)(N-.)) zfile=(${zdir}/^(*.*)(N-.))
if [[ -w ${zdir:h} && -n ${zfile} ]]; then if [[ -w ${zdir:h} && -n ${zfile} ]]; then
zfile=(${${(M)zfile%/*/*}#/}) zfile=(${${(M)zfile%/*/*}#/})
(cd ${zdir:h} && zrecompile -p ${1} ${zdir:t}.zwc ${zfile}) || return 1 (builtin cd -q ${zdir:h} && zrecompile -p ${1} ${zdir:t}.zwc ${zfile}) || return 1
fi fi
done done

View file

@ -7,7 +7,7 @@ readonly REV=${5}
readonly -i QUIET=${6} readonly -i QUIET=${6}
readonly CLEAR_LINE=$'\E[2K\r' readonly CLEAR_LINE=$'\E[2K\r'
(( ! QUIET )) && print -Rn ${CLEAR_LINE}"Updating ${MODULE} …" (( ! QUIET )) && print -Rn ${CLEAR_LINE}"Updating ${MODULE} …"
if ! builtin cd ${DIR} 2>/dev/null; then if ! builtin cd -q ${DIR} 2>/dev/null; then
print -u2 -PR ${CLEAR_LINE}"%F{red}✗ %B${MODULE}:%b Not installed%f" print -u2 -PR ${CLEAR_LINE}"%F{red}✗ %B${MODULE}:%b Not installed%f"
return 1 return 1
fi fi

View file

@ -52,7 +52,7 @@ _zimfw_compile() {
zfile=(${zdir}/^(*.*)(N-.)) zfile=(${zdir}/^(*.*)(N-.))
if [[ -w ${zdir:h} && -n ${zfile} ]]; then if [[ -w ${zdir:h} && -n ${zfile} ]]; then
zfile=(${${(M)zfile%/*/*}#/}) zfile=(${${(M)zfile%/*/*}#/})
(cd ${zdir:h} && zrecompile -p ${1} ${zdir:t}.zwc ${zfile}) || return 1 (builtin cd -q ${zdir:h} && zrecompile -p ${1} ${zdir:t}.zwc ${zfile}) || return 1
fi fi
done done
@ -265,7 +265,7 @@ _zimfw_clean_dumpfile() {
} }
_zimfw_info() { _zimfw_info() {
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 660b8cd)' print 'Zim version: 1.0.0-SNAPSHOT (previous commit is bd8ae83)'
print -R 'ZIM_HOME: '${ZIM_HOME} print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION} print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a) print -R 'System info: '$(command uname -a)
@ -382,7 +382,7 @@ readonly REV=\${5}
readonly -i QUIET=\${6} readonly -i QUIET=\${6}
readonly CLEAR_LINE=$'\E[2K\r' readonly CLEAR_LINE=$'\E[2K\r'
(( ! QUIET )) && print -Rn \${CLEAR_LINE}\"Updating \${MODULE}\" (( ! QUIET )) && print -Rn \${CLEAR_LINE}\"Updating \${MODULE}\"
if ! builtin cd \${DIR} 2>/dev/null; then if ! builtin cd -q \${DIR} 2>/dev/null; then
print -u2 -PR \${CLEAR_LINE}\"%F{red}✗ %B\${MODULE}:%b Not installed%f\" print -u2 -PR \${CLEAR_LINE}\"%F{red}✗ %B\${MODULE}:%b Not installed%f\"
return 1 return 1
fi fi