From 76bfaf89ca5c9bc830a28ee7ed5b6b3d75b595b6 Mon Sep 17 00:00:00 2001 From: Thilo Six Date: Sun, 5 Feb 2017 15:59:18 +0100 Subject: [PATCH] reduce unneeded filesystem seeks it is superflous to check existence of func files with zrcautoload when they are globbed beforehand. This way reduce unneeded filesystem seeks. --- etc/zsh/zshrc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 22b1f1a..d9e5ac8 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -615,13 +615,9 @@ isdarwin && xsource /sw/bin/init.sh # 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' -- 2.1.4