zshrc,dirstack: Remove useless test
[grml-etc-core.git] / etc / zsh / zshrc
index b6c8375..f6434ca 100644 (file)
@@ -1617,12 +1617,12 @@ chpwd() {
     builtin print -l ${GRML_PERSISTENT_DIRSTACK} >! ${DIRSTACKFILE}
 }
 
-if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
+if [[ -f ${DIRSTACKFILE} ]]; then
     # Enabling NULL_GLOB via (N) weeds out any non-existing
     # directories from the saved dir-stack file.
     dirstack=( ${(f)"$(< $DIRSTACKFILE)"}(N) )
     # "cd -" won't work after login by just setting $OLDPWD, so
-    [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
+    [[ -d $dirstack[1] ]] && cd -q $dirstack[1] && cd -q $OLDPWD
 fi
 
 if zstyle -T ':grml:chpwd:dirstack' filter-on-load; then