From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26416 invoked from network); 8 Feb 2000 05:19:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Feb 2000 05:19:50 -0000 Received: (qmail 20901 invoked by alias); 8 Feb 2000 05:19:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9613 Received: (qmail 20892 invoked from network); 8 Feb 2000 05:19:37 -0000 From: "Bart Schaefer" Message-Id: <000207211929.ZM25770@candle.brasslantern.com> Date: Mon, 7 Feb 2000 21:19:29 -0800 In-Reply-To: Comments: In reply to Alexandre Duret-Lutz "Re: Zsh 3.1.6 - ${~foo} expansion bug" (Feb 8, 12:16am) References: X-Mailer: Z-Mail Lite (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: Zsh 3.1.6 - ${~foo} expansion bug Cc: Jukka Laurila MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 8, 12:16am, Alexandre Duret-Lutz wrote: > Subject: Re: Zsh 3.1.6 - ${~foo} expansion bug > > From my experiments I am tempted to deduce that this is > reproducible as long as you don't call a builtin before > the for loop. This is exactly correct; I recompiled with --disable-zshenv to be absolutely certain that no commands were executed by "zsh -f", and now I can reproduce the problem as well. Tracing through, I find that after a builtin has been executed, the `esglob' == 1 at exec.c:1516. The first time through the "for" loop, when it misbehaves, `esglob' == 0. And sure enough, esglob is a static which is not initialized until execcmd() is called. I imagine there some similar problem with `esprefork'. I don't know where these should be getting initialized, though, nor what the right starting value for `esprefork' should be, though `esglob' clearly ought to be initialized to 1.