]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
Improve debug logging in _autoenv_chpwd_handler (#57)
authorDaniel Hahler <github@thequod.de>
Sat, 19 Aug 2017 11:55:35 +0000 (13:55 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Aug 2017 11:55:35 +0000 (13:55 +0200)
autoenv.zsh

index a66f97a35235f23cd81cb368af450a8b99a5cfad..b64b6c7cc06985e324bc5fb146f08ede8b28c851 100644 (file)
@@ -396,7 +396,7 @@ _autoenv_chpwd_handler() {
   fi
 
   local env_file="$PWD/$AUTOENV_FILE_ENTER"
-  _autoenv_debug "env_file: $env_file"
+  _autoenv_debug "looking for env_file: $env_file"
 
   # Handle leave event for previously sourced env files.
   if [[ $AUTOENV_HANDLE_LEAVE == 1 ]] && (( $#_autoenv_stack_entered )); then
@@ -422,8 +422,10 @@ _autoenv_chpwd_handler() {
   if ! [[ -f $env_file ]] && [[ $AUTOENV_LOOK_UPWARDS == 1 ]]; then
     env_file=$(_autoenv_get_file_upwards $PWD)
     if [[ -z $env_file ]]; then
+      _autoenv_debug "No env_file found when looking upwards"
       return
     fi
+    _autoenv_debug "Found env_file: $env_file"
   fi
 
   # Load the env file only once: check if $env_file is in the stack of entered