From: Thilo Six Date: Sun, 5 Feb 2017 19:42:57 +0000 (+0100) Subject: only try to autoload, when there actually is s.th. to X-Git-Tag: v0.14.0~5 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=1e990f925efb9fdb59eef31855abce7434d0d207 only try to autoload, when there actually is s.th. to This fixes a regression introduced today: Only try to autoload, when there actually is s.th. to autoload otherwise "autoload -U" _prints_ all functions that were marked for autoloading thus far. --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index d9e5ac8..48ae2e9 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -616,8 +616,10 @@ isdarwin && xsource /sw/bin/init.sh for fdir in /usr/share/grml/zsh/completion /usr/share/grml/zsh/functions; do fpath=( ${fdir} ${fdir}/**/*(/N) ${fpath} ) done -unset -v fdir -autoload -U /usr/share/grml/zsh/functions/**/[^_]*[^~](N.:t) +typeset -aU ffiles +ffiles=(/usr/share/grml/zsh/functions/**/[^_]*[^~](N.:t)) +(( ${#files} > 0 )) && autoload -U "${ffiles[@]}" +unset -v fdir ffiles # support colors in less export LESS_TERMCAP_mb=$'\E[01;31m'