Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug Report: Env Vars and shell functions
- X-seq: zsh-workers 1569
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Peter Bray <pbray@xxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Bug Report: Env Vars and shell functions
- Date: Mon, 8 Jul 1996 01:58:50 -0700
- In-reply-to: Peter Bray <pbray@xxxxxxxxxxxxxxxx> "Bug Report: Env Vars and shell functions" (Jul 8, 1:49pm)
- References: <199607080349.NAA20085@xxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
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"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author