From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8316 invoked by alias); 8 Jan 2017 20:23:53 -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: 40310 Received: (qmail 12861 invoked from network); 8 Jan 2017 20:23:53 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-3.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.0.253.67):SA:0(-1.2/5.0):. Processed in 1.719948 secs); 08 Jan 2017 20:23:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _smtprelay.virginmedia.com designates 80.0.253.67 as permitted sender) X-Originating-IP: [86.21.219.59] X-Spam: 0 X-Authority: v=2.1 cv=AtwTp7JP c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=1_gCzpSRMnnULq5zmQYA:9 a=CjuIK1q_8ugA:10 a=z9dJwno5l634igLiVhy-:22 Date: Sun, 8 Jan 2017 20:23:45 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: Defining function based on alias Message-ID: <20170108202345.7e8f052c@ntlworld.com> In-Reply-To: <170108121454.ZM10678@torch.brasslantern.com> References: <20170107221659.1b9232da@ntlworld.com> <20170108191922.3d3de59f@ntlworld.com> <170108121454.ZM10678@torch.brasslantern.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 8 Jan 2017 12:14:54 -0800 Bart Schaefer wrote: > On Jan 8, 7:19pm, Peter Stephenson wrote: > } Subject: Re: Defining function based on alias > } > } I am about to commit the following, which I hope will hope will stop > } people coming to grief with this common confusion. Please say if you > } see any problems. > > No problems, but -- if it's possible to detect this situation, why not > simply suppress the alias expansion and define the function as named, > rather than trigger an error? It's too late; we'd have to wind back to where the alias was read and read eveything in again, which is quite contorted, and not actually guaranteed to fix things if it's a tortuous alias. Possibly an even better argument is that this silently changes the syntax, which is usually a bad idea. > I never remember how to rebuild FAQ from FAQ.yo ... can someone check > my yodl syntax? It seems OK but you just run "make" in Etc. pws