X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=ba0df24ddcaf16a95bca5a722e49961f199bcd05;hb=fbb62ecf6accb6fc222ca2fba86730e51f34d7a3;hp=c740a02a806d2fd583d73053ca28db4039cfdd14;hpb=0e5d4b27a71e867d3f96e36d94d90514aeb7fdfd;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index c740a02..ba0df24 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -451,12 +451,20 @@ fi done # autoload zsh modules when they are referenced - is4 && for opt mod in a stat \ - a zpty \ - ap zprof \ - ap mapfile ; do - zmodload -${opt} zsh/${mod} ${mod} - done ; unset opt mod + if is4 ; then + tmpargs=( + a stat + a zpty + ap zprof + ap mapfile + ) + + while (( ${#tmpargs} > 0 )) ; do + zmodload -${tmpargs[1]} zsh/${tmpargs[2]} ${tmpargs[2]} + shift 2 tmpargs + done + unset tmpargs + fi is4 && autoload -U insert-files && \ zle -N insert-files && \