#---------------------------------------------------------- DIRSTACKSIZE=20 if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]]; then dirstack=( ${(uf)"$(< ~/.zdirs)"} ) fi chpwd() { dirs -pl >! ~/.zdirs }
yup this works better! and I am not having any problems with that newline thing btw. But how there be a newline 'in' a folder name?