Instead, use `1' which is the correct way to address the first item of
an array in zsh (with the default settings and the ones we are using).
Reported-by: Daniel Hahler <grml@thequod.de>
Signed-off-by: Frank Terbeck <ft@grml.org>
if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
dirstack=( ${(f)"$(< $DIRSTACKFILE)"} )
# "cd -" won't work after login by just setting $OLDPWD, so
- [[ -d $dirstack[0] ]] && cd $dirstack[0] && cd $OLDPWD
+ [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
fi
chpwd() {