Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
X-AuditID: cbfec7f4-f79026d00000418a-05-56c197ad692b
Date: Mon, 15 Feb 2016 09:17:34 +0000
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Assigning to $0 (formerly: PATCH: funcstack[-1])
Message-id: <20160215091734.320ad457@pwslap01u.europe.root.pri>
In-reply-to: <160214135247.ZM3326@torch.brasslantern.com>
References: <20151230104531.GA20496@linux.vnet.ibm.com>
 <5683F898.7010907@inlv.org> <20160205100902.GA14979@linux.vnet.ibm.com>
 <20160205102735.1f09973a@pwslap01u.europe.root.pri>
 <20160205104444.2437ad33@pwslap01u.europe.root.pri>
 <20160205160236.1274aa5b@pwslap01u.europe.root.pri>
 <20160205222750.1fda3574@ntlworld.com>
 <160214135247.ZM3326@torch.brasslantern.com>
Organization: Samsung Cambridge Solution Centre
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu)
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
X-Brightmail-Tracker:
 H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xq7prpx8MM5jQZWhxsPkhkwOjx6qD
	H5gCGKO4bFJSczLLUov07RK4Mi5/O81Y8JS14vHet4wNjJtZuhg5OSQETCReT9/HDmGLSVy4
	t56ti5GLQ0hgKaNE76rvrBDODCaJvu7/YFVCAucYJe4cz4JInGWUWDP9KiNIgkVAVeLpyW6w
	sWwChhJTN80Gi4sIaEnsOHmSCcQWFrCVeHDwBVgNr4C9xM6Na8HinAKWEp29cxghhv5mkjj0
	fxlYgl9AX+Lq309MEPfZS8y8coYRollQ4sfke2CDmIEWbN7WxAphy0tsXvOWGeJSdYkbd3ez
	T2AUnoWkZRaSlllIWhYwMq9iFE0tTS4oTkrPNdQrTswtLs1L10vOz93ECAnoLzsYFx+zOsQo
	wMGoxMMbceZAmBBrYllxZe4hRgkOZiUR3oRpB8OEeFMSK6tSi/Lji0pzUosPMUpzsCiJ887d
	9T5ESCA9sSQ1OzW1ILUIJsvEwSnVwNjxbMqbmv0BGkLT3j4Q5xWYaqsVm75oZUDLob49cqtb
	/lxRnsXOU8V0zOHopqybx5Zl3bHsZvvcbz5nq1W3QKlR9ZvIK0F/zn5M5XI30tUOLbL8LdL2
	wGb2qvwZYZHX6h8sDipxOcuUfSlvk7HE/dnW8qmM8ukcHI/va5r2sAe8eNoQvqbnjhJLcUai
	oRZzUXEiAPOO8U5kAgAA
X-Seq: zsh-workers 37981

On Sun, 14 Feb 2016 13:52:47 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Feb 5, 10:27pm, Peter Stephenson wrote:
> }
> } By the way, looking at the code I just notice that the following isn't
> } an error even though it doesn't do what you presumably expect:
> } 
> } % setopt posixargzero
> } % print $0
> } zsh
> } % 0=foo
> } % print $0
> } zsh
> } 
> } Maybe that's OK so far, but you don't even get the value back when you
> } unset the option; it's silently lost.
> 
> So what behavior would be preferable?
> 
> 1. POSIXARGZERO makes $0 report an error on assignment (read only?)

This seems to make the most sense.  Setting a value of $0 you're not
going to see immediately is pointless.

pws

