zshrc: check for DIRSTACK{SIZE,FILE} in chpwd()
[grml-etc-core.git] / etc / zsh / zshrc
index c5cd34a..1af7ed7 100644 (file)
@@ -521,8 +521,6 @@ for var in LANG LC_ALL LC_MESSAGES ; do
     [[ -n ${(P)var} ]] && export $var
 done
 
-xsource "/etc/sysconfig/keyboard"
-
 # set some variables
 if check_com -c vim ; then
 #v#
@@ -1558,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