Hello Frank,
Hello Mika,
grmls zshrc contain this lines:
---<---<---<---<---<---<---<---<---<---<---<---<---<---<---<
# Enabling NULL_GLOB via (N) weeds out any non-existing
# directories from the saved dir-stack file.
dirstack=( ${(f)"$(< $DIRSTACKFILE)"}(N) )
---<---<---<---<---<---<---<---<---<---<---<---<---<---<---<
I testet in a clean environment with only grml zshrc and actually
this does not work for me. If $DIRSTACKFILE contain lines with
non-existing dirs these are not weed out but are happily applied
to dirstack=().
This snippet does what i expect:
---<---<---<---<---<---<---<---<---<---<---<---<---<---<---<
# DOES not work :/
# # Enabling NULL_GLOB via (N) weeds out any non-existing
# # directories from the saved dir-stack file.
# dirstack=( ${(f)"$(< ${DIRSTACKFILE})"}(N) )
dirstack=()
dirstacktmp=( ${(f)"$(< ${DIRSTACKFILE})"}(N) )
for d in "${dirstacktmp[@]}"; do
[[ -d ${d} ]] && dirstack+=( ${d} )
done
builtin typeset -U dirstack
builtin unset dirstacktmp
---<---<---<---<---<---<---<---<---<---<---<---<---<---<---<
Additionally:
I have created a little function _dirstack_helper() attached
and a "gui" for it xs(), which is the left hand of cd.
But since i am not sure whether those two are wanted in grml i
attached them as is, prior to spending time on hammering them
into a patch.
If you say you would include them i would do that. |