X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=autoenv.zsh;h=db059f292e319a81f36296d9e7907f3c09d7c040;hb=738e6e965da6a41733199a349d497f796eacd062;hp=e6cfc13f665cc412494732a2f3722ef56b464d59;hpb=3a19a221407fd457298f0b50b40328926381c1b7;p=zsh-autoenv.git diff --git a/autoenv.zsh b/autoenv.zsh index e6cfc13..db059f2 100644 --- a/autoenv.zsh +++ b/autoenv.zsh @@ -303,7 +303,16 @@ _autoenv_source() { # Source the env file. _autoenv_debug "== SOURCE: ${bold_color:-}$autoenv_env_file${reset_color:-}\n PWD: $PWD" : $(( _autoenv_debug_indent++ )) + + local restore_xtrace + if [[ $AUTOENV_DEBUG -gt 2 && ! -o xtrace ]]; then + restore_xtrace=1 + setopt localoptions xtrace + fi source $autoenv_env_file + if (( restore_xtrace )); then + setopt noxtrace + fi : $(( _autoenv_debug_indent-- )) _autoenv_debug "== END SOURCE =="