Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Assigning to $0 (formerly: PATCH: funcstack[-1])
- X-seq: zsh-workers 37981
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Assigning to $0 (formerly: PATCH: funcstack[-1])
- Date: Mon, 15 Feb 2016 09:17:34 +0000
- In-reply-to: <160214135247.ZM3326@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- 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>
On Sun, 14 Feb 2016 13:52:47 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author