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 PAA05456 for ; Fri, 9 Aug 1996 15:54:57 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA23175; Fri, 9 Aug 1996 01:45:42 -0400 (EDT) Resent-Date: Fri, 9 Aug 1996 01:43:50 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960808224452.ZM21431@candle.brasslantern.com> Date: Thu, 8 Aug 1996 22:44:52 -0700 In-Reply-To: Rik Faith "Re: local after setopt allexport?" (Aug 8, 10:50pm) References: <199608061938.PAA07278@proteus.cs.unc.edu> <199608070729.JAA29678@hydra.ifh.de> <199608090250.WAA00413@winter.cs.unc.edu> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.729 29jul96) To: Peter Stephenson , Rik Faith , zsh-users@math.gatech.edu Subject: Re: local after setopt allexport? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"JsJCK2.0.Qf5.L0j2o"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/350 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 8, 10:50pm, Rik Faith wrote: } Subject: Re: local after setopt allexport? } } If this is not a compatibility or historical practice issue, I'd like to } suggest that the commands "local", "typeset", etc. all look like they are } used to declare the "type" of a variable. As such, it seems that } "exportable" is a type attribute and that this attribute should be } associated with a variable for the remainder of its lifetime (or until } another typeset). This is in fact what happens when `allexport' is NOT set. } This could be implemented internally in zsh with a } tri-state flag: +x for exportable, -x for local, and ?x for "use the } current state of the allexport option". It'd have to be +x for local, -x for exported, to be consistent with existing usage. 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.) -- 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"