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 coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id SAA01838 for ; Fri, 9 Aug 1996 18:52:27 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA24675; Fri, 9 Aug 1996 04:50:35 -0400 (EDT) Resent-Date: Fri, 9 Aug 1996 04:50:35 -0400 (EDT) Message-Id: <199608090849.KAA02827@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: local after setopt allexport? In-reply-to: "schaefer@candle.brasslantern.com"'s message of "Thu, 08 Aug 1996 22:44:52 MET." <960808224452.ZM21431@candle.brasslantern.com> Date: Fri, 09 Aug 1996 10:49:15 +0200 From: Peter Stephenson Resent-Message-ID: <"0tgJM3.0.U16.Qll2o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1936 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu schaefer@candle.brasslantern.com wrote: > I confess to be curious why: > > setopt allexport > typeset +x FOO=bar > > results in FOO being exported, whereas > > setopt allexport > FOO=bar > typeset +x FOO > > results in FOO being local. Does ksh really ignore the `+x' in the > first example? (I should get pdksh so I can stop asking this stuff, > but then again, most of the time I don't *want* pdksh.) It looks like ksh makes FOO local in both cases --- in fact, even without the +x in the first case. This is just one of many inconsistencies with typeset which needs a much clearer logic. Another is that typeset with an existing sufficiently local variable reports the value, which is confusing in functions. If I had a list of all the things it should and shouldn't do I might attempt to rewrite it one day. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.