From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes From: "Bart Schaefer" Message-Id: <990206151920.ZM31760@candle.brasslantern.com> Date: Sat, 6 Feb 1999 15:19:20 -0800 X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@sunsite.auc.dk Subject: `unset`, zerr(), and `eval` MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailing-List: 5300 Consider the two following zsh snippets: unset IFS for i in "${(O)${(@f)$(set)}%%\=*}" do unset $(eval echo $i) done unset IFS for i in "${(O)${(@f)$(set)}%%\=*}" do eval unset $i done The first loop terminates as soon as it hits the first read-only parameter (which happens to be "status" in this case). The second loop spits out a warning message for every readonly parameter, and continues until it has unset every parameter that it can. (Both loops crash if you don't apply the OLDPWD patch I sent this afternoon.) Seems there could be two problems here. Isn't it overkill to get zerr()'d when attempting to unset a readonly parameter? Is it intentional that an "eval" will mask such errors? (It's kinda perl-ish, I admit, but ...) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com