it is superflous to check existence of func files with zrcautoload
when they are globbed beforehand.
This way reduce unneeded filesystem seeks.
# load our function and completion directories
for fdir in /usr/share/grml/zsh/completion /usr/share/grml/zsh/functions; do
fpath=( ${fdir} ${fdir}/**/*(/N) ${fpath} )
- if [[ ${fdir} == '/usr/share/grml/zsh/functions' ]] ; then
- for func in ${fdir}/**/[^_]*[^~](N.) ; do
- zrcautoload ${func:t}
- done
- fi
done
-unset fdir func
+unset -v fdir
+autoload -U /usr/share/grml/zsh/functions/**/[^_]*[^~](N.:t)
# support colors in less
export LESS_TERMCAP_mb=$'\E[01;31m'