From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12563 invoked from network); 10 Sep 2009 15:25:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 10 Sep 2009 15:25:07 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 97211 invoked from network); 10 Sep 2009 15:23:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Sep 2009 15:23:25 -0000 Received: (qmail 8844 invoked by alias); 10 Sep 2009 15:23:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27263 Received: (qmail 8821 invoked from network); 10 Sep 2009 15:23:21 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Sep 2009 15:23:21 -0000 Received: from QMTA06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9BC998043ADF for ; Thu, 10 Sep 2009 17:23:08 +0200 (CEST) Received: from OMTA22.westchester.pa.mail.comcast.net ([76.96.62.73]) by QMTA06.westchester.pa.mail.comcast.net with comcast id f01E1c0021ap0As563NuWE; Thu, 10 Sep 2009 15:22:54 +0000 Received: from smtp.klanderman.net ([98.217.254.247]) by OMTA22.westchester.pa.mail.comcast.net with comcast id f3SX1c00A5M2Np63i3SY8m; Thu, 10 Sep 2009 15:26:32 +0000 Received: from lwm.klanderman.net (unknown [192.168.100.50]) by smtp.klanderman.net (Postfix) with ESMTP id 8BAD4B3015C for ; Thu, 10 Sep 2009 11:23:02 -0400 (EDT) Received: by lwm.klanderman.net (Postfix, from userid 500) id 7A0F89FC5F3; Thu, 10 Sep 2009 11:23:02 -0400 (EDT) From: Greg Klanderman To: zsh-workers@sunsite.dk Subject: Re: completion bug: treats substitution of unset parameter as empty string Reply-To: gak@klanderman.net Date: Thu, 10 Sep 2009 11:23:02 -0400 In-Reply-To: <20090910154053.3de0f8eb@news01> (Peter Stephenson's message of "Thu, 10 Sep 2009 15:40:53 +0100") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (linux) References: <19056.37899.24683.999959@gargle.gargle.HOWL> <200909100926.n8A9QFTh025636@news01.csr.com> <20090910154053.3de0f8eb@news01> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9791/Thu Sep 10 03:03:33 2009 on bifrost X-Virus-Status: Clean >>>>> On September 10, 2009 Peter Stephenson wrote: > That's fine, however I think (belatedly answering your other question) > that, since we don't need to backport this anywhere, using an anonymous > function would be neater---so we're not relying on the value of "nounset" > outside. In practice if it were set outside all hell would break loose, so > this is pretty pernickety, but perhaps it's a useful precedent. That works too. I went with the setopt .. unsetopt since that's what other completion functions were doing. I do prefer the anonymous function, aside from my objection to calling such things functions. If I could pass arguments after the '}' maybe but you still cannot control when it is called - it's only a local scope, not a function. greg