X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=d4978e4e04adf51b0e9971170e1258d4ff48e69a;hb=ef0f2491f306bf6ca59090f9ef68e7f7a8420461;hp=e88ba042553713d080b30e1c658803667a8cfeac;hpb=33bc6db8acfbd3a336056686b69e022f0ea5f8a3;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index e88ba04..d4978e4 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1620,7 +1620,9 @@ DIRSTACKSIZE=${DIRSTACKSIZE:-20} DIRSTACKFILE=${DIRSTACKFILE:-${ZDOTDIR:-${HOME}}/.zdirs} if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then - dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) + # 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 fi