From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12074 invoked by alias); 16 Jun 2015 19:05:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35493 Received: (qmail 14973 invoked from network); 16 Jun 2015 19:05:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=5jMfvE8UHeGyfZFlaYruAOkR9KL0bid+QxbPighqdDU=; b=Q4o/vz++73hO//sao249vt905khjIqq3qkAlHfj0Wt54zCl5yTxYcriicco3NDJi/I eDx2riaaOC1j3ZionSLJLso8m8fZjTuwwOWjz91F2Cg8v2g73I+uqZ3kDXynqfru5qtF bQr0ehf3+dLyb0SnjyPng4YWPw8x91ncEb+smOAH5jkzVEu9XrYC//24QqPGD7IUyC8O 8okmSAqNZKu0bfMfwLrmXAWfb8C/uiud2v9oI/u+L9927wy2EX7Zyj5ly1DaD+pRl5n8 9FrzKcPUlZQkIcIu3IIr03Q3dnaS8lca9zdRXvXb0AkRIkQjDl+Cv3siBRPbnQjR5Un5 1lgg== X-Gm-Message-State: ALoCoQmyhXBm9igMT0cev6blDNJzad6ulEPUq8Gt8GsjDqSi4oIdHwlzfrpf3LYgOUn0G/fiX/rS X-Received: by 10.182.153.197 with SMTP id vi5mr1491726obb.28.1434481516013; Tue, 16 Jun 2015 12:05:16 -0700 (PDT) From: Bart Schaefer Message-Id: <150616120512.ZM27031@torch.brasslantern.com> Date: Tue, 16 Jun 2015 12:05:12 -0700 In-Reply-To: <150615202431.ZM25744@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Read-only variables in emulation mode" (Jun 15, 8:24pm) References: <131216114013.ZM25877@torch.brasslantern.com> <131217223651.ZM20980@torch.brasslantern.com> <20131218192816.047ab5f5@pws-pc.ntlworld.com> <131218235723.ZM4638@torch.brasslantern.com> <150615202431.ZM25744@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: Read-only variables in emulation mode MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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);