From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15656 invoked from network); 5 Jun 1998 08:33:46 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 5 Jun 1998 08:33:46 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id EAA16730; Fri, 5 Jun 1998 04:22:41 -0400 (EDT) Resent-Date: Fri, 5 Jun 1998 04:22:41 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980605012221.ZM17240@candle.brasslantern.com> Date: Fri, 5 Jun 1998 01:22:21 -0700 In-Reply-To: <199806050739.JAA27113@hydra.ifh.de> Comments: In reply to Peter Stephenson "Re: sourcing of /etc/profile with $0 == -sh" (Jun 5, 9:39am) References: <199806050739.JAA27113@hydra.ifh.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: sourcing of /etc/profile with $0 == -sh Cc: "Andrej Borsenkow" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"MmzzN3.0.L54.GhwTr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4049 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jun 5, 9:39am, Peter Stephenson wrote: } Subject: Re: sourcing of /etc/profile with $0 == -sh } } % fn() { 0=foo; echo $0; } } % fn } foo } % echo $0 } zsh } } This fact should probably be construed as a genuine feature. If you're } asking, is some bright spark going to decide that $0 should be different } from $1 to $infinity and break it, I can't answer that, but it won't be me. Actually, Peter, you're already too late. That had better be fn() { setopt functionargzero 0=foo echo $0 } Otherwise, assigning to 0 in the function assigns to the "global" $0. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com