zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Assigning to $0 (formerly: PATCH: funcstack[-1])
Date: Mon, 15 Feb 2016 09:17:34 +0000	[thread overview]
Message-ID: <20160215091734.320ad457@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <160214135247.ZM3326@torch.brasslantern.com>

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


  parent reply	other threads:[~2016-02-15  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151230104531.GA20496@linux.vnet.ibm.com>
     [not found] ` <5683F898.7010907@inlv.org>
     [not found]   ` <20160205100902.GA14979@linux.vnet.ibm.com>
     [not found]     ` <20160205102735.1f09973a@pwslap01u.europe.root.pri>
     [not found]       ` <20160205104444.2437ad33@pwslap01u.europe.root.pri>
     [not found]         ` <20160205160236.1274aa5b@pwslap01u.europe.root.pri>
2016-02-05 22:27           ` PATCH: funcstack[-1] (formerly Suppress tracing of "set +x") Peter Stephenson
2016-02-07  0:22             ` Daniel Shahaf
2016-02-14 21:52             ` Assigning to $0 (formerly: PATCH: funcstack[-1]) Bart Schaefer
2016-02-15  6:51               ` Mikael Magnusson
2016-02-15  9:17               ` Peter Stephenson [this message]
2016-02-15 17:08                 ` Bart Schaefer
2016-02-15 17:12                   ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160215091734.320ad457@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).