1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2024-11-25 16:31:00 +02:00

Better fix for return value of _autoenv_source

Follow up to 8763a5b.
This commit is contained in:
Daniel Hahler 2017-08-19 14:50:20 +02:00
parent 4b1cae055d
commit e0fc4bb58a

View File

@ -299,7 +299,7 @@ _autoenv_source() {
# Source the env file. # Source the env file.
_autoenv_debug "== SOURCE: ${bold_color:-}$autoenv_env_file${reset_color:-}\n PWD: $PWD" _autoenv_debug "== SOURCE: ${bold_color:-}$autoenv_env_file${reset_color:-}\n PWD: $PWD"
: $(( _autoenv_debug_indent++ )) (( ++_autoenv_debug_indent ))
local restore_xtrace local restore_xtrace
if [[ $AUTOENV_DEBUG -gt 2 && ! -o xtrace ]]; then if [[ $AUTOENV_DEBUG -gt 2 && ! -o xtrace ]]; then
@ -310,7 +310,7 @@ _autoenv_source() {
if (( restore_xtrace )); then if (( restore_xtrace )); then
setopt noxtrace setopt noxtrace
fi fi
: $(( _autoenv_debug_indent-- )) (( --_autoenv_debug_indent ))
_autoenv_debug "== END SOURCE ==" _autoenv_debug "== END SOURCE =="
if [[ $autoenv_event == enter ]]; then if [[ $autoenv_event == enter ]]; then
@ -440,7 +440,7 @@ _autoenv_chpwd_handler() {
_autoenv_debug "Sourcing from chpwd handler: $env_file" _autoenv_debug "Sourcing from chpwd handler: $env_file"
_autoenv_source $env_file enter _autoenv_source $env_file enter
: $(( _autoenv_debug_indent++ )) (( ++_autoenv_debug_indent ))
} }
# }}} # }}}