]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
Better fix for return value of _autoenv_source
authorDaniel Hahler <git@thequod.de>
Sat, 19 Aug 2017 12:50:20 +0000 (14:50 +0200)
committerDaniel Hahler <git@thequod.de>
Sat, 19 Aug 2017 12:50:20 +0000 (14:50 +0200)
Follow up to 8763a5b.

autoenv.zsh

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