From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id TAA19778 for ; Mon, 8 Jul 1996 19:33:21 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA04010; Mon, 8 Jul 1996 04:58:11 -0400 (EDT) Resent-Date: Mon, 8 Jul 1996 04:58:11 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960708015853.ZM8327@candle.brasslantern.com> Date: Mon, 8 Jul 1996 01:58:50 -0700 In-Reply-To: Peter Bray "Bug Report: Env Vars and shell functions" (Jul 8, 1:49pm) References: <199607080349.NAA20085@cod.ind.tansu.com.au> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: Peter Bray , zsh-workers@math.gatech.edu Subject: Re: Bug Report: Env Vars and shell functions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"8dtN02.0.a-.UsCun"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1569 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 8, 1:49pm, Peter Bray wrote: } Subject: Bug Report: Env Vars and shell functions } } Can others reproduce this bug in zsh-3.0-pre2, where a command } line environment variable is ignored in other functions called by the } original functions. The local environment seems to get lost on the second and succeeding passes around the 'for' loop. zagzig[52] bar() { echo $1 $BAR } zagzig[53] foo() { bar } zagzig[54] BAR=foo foo foo zagzig[55] foo() { for x in 1 2 3 ; do bar $x ; done } zagzig[56] foo 1 2 3 zagzig[57] BAR=foo foo 1 foo 2 3 I didn't try other looping constructs. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"