From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3885 invoked from network); 11 Dec 1998 13:06:36 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 11 Dec 1998 13:06:36 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id IAA07596; Fri, 11 Dec 1998 08:01:38 -0500 (EST) Resent-Date: Fri, 11 Dec 1998 08:01:38 -0500 (EST) Message-Id: <9812111245.AA42577@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu Subject: Re: PATCH: 3.1.5: eval with exported vars In-Reply-To: ""Andrej Borsenkow""'s message of "Fri, 11 Dec 1998 15:23:11 NFT." <001801be2501$04976be0$21c9ca95@mowp.siemens.ru> Date: Fri, 11 Dec 1998 13:45:12 +0100 From: Peter Stephenson Resent-Message-ID: <"wxLod.0.ds1.oUHSs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4750 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Andrej Borsenkow" wrote: > But as I understand, your patch blindly exports variable for every builtin? No, just eval, which is a peculiar case because you really don't know what it's going to do. The workaround I gave (assignment after the eval) is really the best way of doing it. You can certainly argue it's not right to have eval as a special case, but I'd say exporting it rather than just setting it is the safest here. > bor@itsrm2:/tools/var%> FOO=x eval sh -c '"echo $FOO"' > x > bor@itsrm2:/tools/var%> echo $FOO > > Still wrong - FOO disappears. This is supposed to depend on the setting of POSIXBUILTINS. It does seem to work for me. It's annoying there's yet another option, but I think it's mainly for setting for for ksh emulation rather than `real' zsh users. Possibly the patch I sent should have a !isset(POSIXBUILTINS) wrapper? -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy