From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16588 invoked by alias); 4 May 2013 13:47:16 -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: 31369 Received: (qmail 11339 invoked from network); 4 May 2013 13:47:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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 autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 209.85.212.176 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-proxyuser-ip:date:from:to:subject:message-id :in-reply-to:references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=33H1uNkja9T1tGPUEWeKNcARRl1/oZ17qw8nTzjNcB0=; b=TVmscgIIrQavfsSTNufe5TBAeAFbeytZ1DW1tHMtNCa6bztiql5bIQWtkkBonxVu5l Mmcp8uxcKqNBU1demX6d0Ga92MSI0uxjzbL5Y2ALWJjsILus/1OLDb3xhltF3G4fwMxz 9132kOrYdJlqUQc7kccEIDc+LOpPef6+AB+LcT0QgdqACzhGS1rf3INEz5bFbcqpplrh hRUyi90KSZk68xnMHcHNFHfTiLC80R7c6mNbiSd6hv4Cyc/uhvweq0a62n+fBBnC4gj3 jvMoHrQwBuxU2o7nai4upd1LjFU7gCQb/r0Bio+RTcMcM4YIVPj7Hp1SXXEkNx50tpvp QbGQ== X-Received: by 10.180.109.48 with SMTP id hp16mr2071795wib.24.1367674786769; Sat, 04 May 2013 06:39:46 -0700 (PDT) X-ProxyUser-IP: 86.6.30.159 Date: Sat, 4 May 2013 14:39:42 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: behavior of in-line variable assignments preceding functions, special built-ins Message-ID: <20130504143942.0ece2d0e@pws-pc.ntlworld.com> In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkxs8xiGBfvZgyDOd4E8Fffojq+r+cXAaBhO3nIMY2CnGklUyPUfnfCAqgGG7j+Ru2V1Rel On Thu, 2 May 2013 14:44:17 -0700 (PDT) Bart Schaefer wrote: > I haven't worked out whether the change described below renders zsh's > assignment behavior non-conforming. Nothing major, by the looks of things: it looks like a tightening up of corner cases. I suppose we really need a .ztst to test it all thoroughly, which shouldn't be hard to put together, although rather dull. It's not entirely clear to me whether "a standard utility implemented as a function" applies if the user decides to create a function to take over a builtin, but I would think that isn't the intention --- the intention must surely be the user knows how the bare system works. That's certainly my reading of the referenced section 4.21, The system may implement certain utilities as shell functions (see XCU Function Definition Command) or built-in utilities, but only an application that is aware of the command search order (as described in XCU Command Search and Execution) or of performance characteristics can discern differences between the behavior of such a function or built-in utility and that of an executable file so I don't think that applies to zsh. I notice it's already the case that functions behave like special builtins in many respects. I can't remember ever checking that explicitly (but the number of things I can't remember doing is considerable). -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/