zshrc,dirstack: Remove useless test
authorFrank Terbeck <ft@grml.org>
Tue, 11 Aug 2015 10:07:59 +0000 (12:07 +0200)
committerFrank Terbeck <ft@grml.org>
Tue, 11 Aug 2015 10:07:59 +0000 (12:07 +0200)
At this point, $dirstack is always empty so the test is always true.

etc/zsh/zshrc

index 72fde6e..f6434ca 100644 (file)
@@ -1617,7 +1617,7 @@ chpwd() {
     builtin print -l ${GRML_PERSISTENT_DIRSTACK} >! ${DIRSTACKFILE}
 }
 
     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) )
     # Enabling NULL_GLOB via (N) weeds out any non-existing
     # directories from the saved dir-stack file.
     dirstack=( ${(f)"$(< $DIRSTACKFILE)"}(N) )