X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=5b86f311f6b5cfa2c638de53c0a34063b8f66464;hb=cdbb53b4514fd48e8f8edf759b9cc8341056bf27;hp=e88ba042553713d080b30e1c658803667a8cfeac;hpb=33bc6db8acfbd3a336056686b69e022f0ea5f8a3;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index e88ba04..5b86f31 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -981,7 +981,7 @@ function Accept-Line-HandleContext() { function accept-line() { setopt localoptions noksharrays - local -ax cmdline + local -a cmdline local -x alcontext local buf com fname format msg default_action @@ -1620,14 +1620,16 @@ 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 chpwd() { if (( $DIRSTACKSIZE <= 0 )) || [[ -z $DIRSTACKFILE ]]; then return; fi - local -ax my_stack + local -a my_stack my_stack=( ${PWD} ${dirstack} ) if is42 ; then builtin print -l ${(u)my_stack} >! ${DIRSTACKFILE}