mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-22 07:20:59 +02:00
minor: fix doc / improve debug logging (#80)
This commit is contained in:
parent
468fa71d15
commit
bba8f04258
@ -119,13 +119,13 @@ event was handled?
|
||||
|
||||
Default: `1`
|
||||
|
||||
### AUTOENV\_DISABLED
|
||||
### AUTOENV_DISABLED
|
||||
|
||||
(Temporarily) disable zsh-autoenv. This gets looked at in the chpwd handler.
|
||||
|
||||
Default: 0
|
||||
|
||||
### AUTOENV\_DEBUG
|
||||
### AUTOENV_DEBUG
|
||||
|
||||
Set debug level. If enabled (> 0) it will print information to stderr.
|
||||
|
||||
|
@ -296,7 +296,7 @@ _autoenv_source() {
|
||||
fi
|
||||
|
||||
# Source the env file.
|
||||
_autoenv_debug "== SOURCE: ${bold_color:-}$autoenv_env_file${reset_color:-}\n PWD: $PWD"
|
||||
_autoenv_debug "== SOURCE: $autoenv_event: ${bold_color:-}$autoenv_env_file${reset_color:-} (in $PWD)"
|
||||
(( ++_autoenv_debug_indent ))
|
||||
|
||||
local restore_xtrace
|
||||
@ -401,6 +401,7 @@ _autoenv_chpwd_handler() {
|
||||
prev_dir=${prev_file:h}
|
||||
if ! [[ ${PWD}/ == ${prev_dir}/* ]]; then
|
||||
local env_file_leave=$prev_dir/$AUTOENV_FILE_LEAVE
|
||||
_autoenv_debug "Handling leave event: $env_file_leave"
|
||||
if _autoenv_check_authorized_env_file $env_file_leave; then
|
||||
varstash_dir=$prev_dir _autoenv_source $env_file_leave leave $prev_dir
|
||||
fi
|
||||
@ -438,8 +439,6 @@ _autoenv_chpwd_handler() {
|
||||
# Source the enter env file.
|
||||
_autoenv_debug "Sourcing from chpwd handler: $env_file"
|
||||
_autoenv_source $env_file enter
|
||||
|
||||
(( ++_autoenv_debug_indent ))
|
||||
}
|
||||
# }}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user