From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9738 invoked by alias); 16 Jun 2015 03:24:39 -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: 35481 Received: (qmail 15714 invoked from network); 16 Jun 2015 03:24:37 -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=HJFyJtf/E0NAgtlPg0IoxCok1M/ZWNNKlFXiG5NUsmA=; b=YM4MQ5bOWC28TK7v0epof+4W0tubLTIgFlRSN9ZUx0mjKrsbNRUPKOKWW/XhLLtjj2 KHTr2CNrSDqLboo9dLic9DA0npbvH0WYyGzq09ob+obUTghPwmSOO3M+On14peJwojyF OOld2uc1IrUN52Qb3kYtr2iqjC7oI8vHty/a9UNuYpio//LBiHjZx4zXBC1Q2ZvlyML3 6ztXBCMMBc7hMMk3vFjM1O1hZVKm+MrxDNmZ153wYJU0edcZyF0RuiCDtNMfb34F/pTO MdPLfCYZve/nr9M2xq63ryZ/8AnRcIfuLXT9mgO7xbXI6RCID3eqTqnkgFoOirmFdYpC wD6A== X-Gm-Message-State: ALoCoQk+UW1wVnvf4MO+Xib1h7ebnwoSut2PqEWp/780LXIPtPizJgStjoiHRPHulF1a/2WCugHc X-Received: by 10.182.20.232 with SMTP id q8mr26839612obe.83.1434425075528; Mon, 15 Jun 2015 20:24:35 -0700 (PDT) From: Bart Schaefer Message-Id: <150615202431.ZM25744@torch.brasslantern.com> Date: Mon, 15 Jun 2015 20:24:31 -0700 In-Reply-To: Comments: In reply to Mikael Magnusson "Re: Read-only variables in emulation mode" (Jun 16, 2:10am) References: <131216114013.ZM25877@torch.brasslantern.com> <131217223651.ZM20980@torch.brasslantern.com> <20131218192816.047ab5f5@pws-pc.ntlworld.com> <131218235723.ZM4638@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 16, 2:10am, Mikael Magnusson wrote: } } % echo hi; _=foo; echo $_ } hi } hi That's actually a bug -- the assignment _=foo should erase $_ , I think. } % for _ in a b c; do echo $_ hi; done } hi } hi hi } hi hi } } I'm not sure if this is better than printing a warning that $_ is } readonly. :) If you go back to the original message in the thread, the whole point was to use $_ as a dummy variable that didn't need to be declared and whose value was instantly discarded. For that purpose, the warning is extraneous. Admittedly that's a pretty constrained use case.