zshrc: check for DIRSTACK{SIZE,FILE} in chpwd()
[grml-etc-core.git] / etc / zsh / zshrc
index bd8ab85..1af7ed7 100644 (file)
@@ -1556,6 +1556,7 @@ if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
 fi
 
 chpwd() {
+    if (( $DIRSTACKSIZE <= 0 )) || [[ -z $DIRSTACKFILE ]]; then return; fi
     local -ax my_stack
     my_stack=( ${PWD} ${dirstack} )
     if is42 ; then