zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Read-only variables in emulation mode
Date: Tue, 16 Jun 2015 12:05:12 -0700	[thread overview]
Message-ID: <150616120512.ZM27031@torch.brasslantern.com> (raw)
In-Reply-To: <150615202431.ZM25744@torch.brasslantern.com>

On Jun 15,  8:24pm, Bart Schaefer wrote:
}
} On Jun 16,  2:10am, Mikael Magnusson wrote:
} }
} } % echo hi; _=foo; echo $_
} } hi
} } hi
} 
} That's actually a bug -- the assignment _=foo should erase $_ , I think.

Anybody see a problem with this?

diff --git a/Src/exec.c b/Src/exec.c
index daed3b1..35a101b 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1115,6 +1115,7 @@ execsimple(Estate state)
     if (code == WC_ASSIGN) {
 	cmdoutval = 0;
 	addvars(state, state->pc - 1, 0);
+	setunderscore("");
 	if (isset(XTRACE)) {
 	    fputc('\n', xtrerr);
 	    fflush(xtrerr);


      parent reply	other threads:[~2015-06-16 19:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 19:10 Øystein Walle
2013-12-16 19:40 ` Bart Schaefer
2013-12-18  6:36   ` Bart Schaefer
2013-12-18 19:28     ` Peter Stephenson
2013-12-19  7:57       ` Bart Schaefer
2015-06-16  0:10         ` Mikael Magnusson
2015-06-16  3:24           ` Bart Schaefer
2015-06-16  6:24             ` Mikael Magnusson
2015-06-16 15:54               ` Bart Schaefer
2015-06-16 21:06                 ` Mikael Magnusson
2015-06-16 19:05             ` Bart Schaefer [this message]

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=150616120512.ZM27031@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).