From a55d3a49488ef61c21912f12fba2fc81445b4a02 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Mon, 22 Oct 2007 16:44:55 +0200 Subject: [PATCH] zshrc: not using 'for name0 name1 in a b c d ; ...' anymore Replacing that contruct with something, that does not break older zshs. --- etc/zsh/zshrc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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 && \ -- 2.1.4