From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16208 invoked from network); 9 Sep 2009 04:11:10 -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; 9 Sep 2009 04:11:10 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 24671 invoked from network); 9 Sep 2009 04:11:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Sep 2009 04:11:02 -0000 Received: (qmail 4065 invoked by alias); 9 Sep 2009 04:10:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27253 Received: (qmail 4041 invoked from network); 9 Sep 2009 04:10:54 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 9 Sep 2009 04:10:54 -0000 Received: from QMTA13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by bifrost.dotsrc.org (Postfix) with ESMTP id 54356801E2BF for ; Wed, 9 Sep 2009 06:10:46 +0200 (CEST) Received: from OMTA02.westchester.pa.mail.comcast.net ([76.96.62.19]) by QMTA13.westchester.pa.mail.comcast.net with comcast id eU231c0020QuhwU5DUAm8P; Wed, 09 Sep 2009 04:10:46 +0000 Received: from smtp.klanderman.net ([98.217.254.247]) by OMTA02.westchester.pa.mail.comcast.net with comcast id eUAm1c00L5M2Np63NUAmWk; Wed, 09 Sep 2009 04:10:46 +0000 Received: from lwm.klanderman.net (unknown [192.168.100.50]) by smtp.klanderman.net (Postfix) with ESMTP id 21829B3015C; Wed, 9 Sep 2009 00:10:45 -0400 (EDT) Received: by lwm.klanderman.net (Postfix, from userid 500) id DF4D89FC5F3; Wed, 9 Sep 2009 00:10:44 -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: Wed, 09 Sep 2009 00:10:44 -0400 In-Reply-To: <19056.37899.24683.999959@gargle.gargle.HOWL> (Greg Klanderman's message of "Wed, 29 Jul 2009 14:25:15 -0400") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (linux) References: <19056.37899.24683.999959@gargle.gargle.HOWL> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9786/Wed Sep 9 04:58:04 2009 on bifrost X-Virus-Status: Clean >>>>> On July 29, 2009 -- Greg Klanderman wrote: > % unset Q > % ls $Q/ > lists completions in '/' rather than beep because there are no > completions. > I do have the 'nounset' option set, though I think this should > give an error / no completions either way, as it did with the > old compctl system. OK, so just this line in _path_files needs 'setopt nounset': | eval 'realpath=${(e)~linepath}' 2>/dev/null Is the best way to do that to use an anonymous function: | function { | setopt localoptions nounset | eval 'realpath=${(e)~linepath}' 2>/dev/null | } or is this paradigm which I see in a few places preferred: | setopt nounset | eval 'realpath=${(e)~linepath}' 2>/dev/null | setopt unset How exactly is the default set of shell options arrived at for the evaluation of completion functions? My own setopts do not seem to effect the completion functions.. how is that? thanks, Greg