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 MAA01970 for ; Sun, 4 Aug 1996 12:04:43 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id VAA07306; Sat, 3 Aug 1996 21:40:08 -0400 (EDT) Resent-Date: Sat, 3 Aug 1996 21:40:08 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960803184114.ZM2455@candle.brasslantern.com> Date: Sat, 3 Aug 1996 18:41:14 -0700 In-Reply-To: Zoltan Hidvegi "Re: New zed and refresh bug" (Aug 4, 2:42am) References: <199608040042.CAA00567@hzoli.ppp.cs.elte.hu> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: Zoltan Hidvegi Subject: Local variables and "typeset" Cc: zsh-workers@math.gatech.edu (Zsh hacking and development) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"Pf0fT3.0.4o1.tz_0o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1915 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 4, 2:42am, Zoltan Hidvegi wrote: } Subject: Re: New zed and refresh bug } } > On Jul 29, 4:21pm, Zoltan Hidvegi wrote: } > } Subject: Re: New zed and refresh bug } > } } > } I's even simpler. Since TMOUT is not special now, the patch below works. } > } Note that integer makes TMOUT local. } > } > Yes; WHY??? This seems completely counterintuitive to me. } } typeset creates local variables as in ksh. Well, that's at least a reason, but it seems silly to have a special variant of typeset called "local" which rejects certain flags like -x, but then add "oh, by the way, typeset creates local variables too." Is it even possible from inside a shell function to create a variable which has a special property (such as integer, or right-justified) and is NOT local to the function BUT is NOT exported into the environment? It seems as though this *should* be possible, which (coupled with the existence of "local") is why I say that it's counterintuitive to have integer/typeset/etc. create locals. It would make much more sense if "typset -x" always created environment variables, "typeset" always created shell global variables, and "local" always created locals. -- 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"