From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28989 invoked from network); 10 Jul 2009 14:06:59 -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 Jul 2009 14:06:59 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 86973 invoked from network); 10 Jul 2009 14:06:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Jul 2009 14:06:42 -0000 Received: (qmail 7294 invoked by alias); 10 Jul 2009 14:06:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27123 Received: (qmail 7271 invoked from network); 10 Jul 2009 14:06:28 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Jul 2009 14:06:28 -0000 Received: from QMTA08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by bifrost.dotsrc.org (Postfix) with ESMTP id 889658027106 for ; Fri, 10 Jul 2009 16:06:23 +0200 (CEST) Received: from OMTA05.westchester.pa.mail.comcast.net ([76.96.62.43]) by QMTA08.westchester.pa.mail.comcast.net with comcast id EBrm1c00G0vyq2s58E6NP8; Fri, 10 Jul 2009 14:06:22 +0000 Received: from smtp.klanderman.net ([98.217.254.247]) by OMTA05.westchester.pa.mail.comcast.net with comcast id EE6M1c00r5M2Np63RE6MVc; Fri, 10 Jul 2009 14:06:22 +0000 Received: from lwm.klanderman.net (unknown [192.168.100.50]) by smtp.klanderman.net (Postfix) with ESMTP id 89AF5B30148 for ; Fri, 10 Jul 2009 10:06:20 -0400 (EDT) Received: by lwm.klanderman.net (Postfix, from userid 500) id 6A0229FC61C; Fri, 10 Jul 2009 10:06:20 -0400 (EDT) From: Greg Klanderman To: zsh-workers@sunsite.dk Subject: Re: file completion of ~user/... stats wrong directory Reply-To: gak@klanderman.net Date: Fri, 10 Jul 2009 10:06:20 -0400 In-Reply-To: <20090710100721.56b0874c@news01> (Peter Stephenson's message of "Fri, 10 Jul 2009 10:07:21 +0100") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (linux) References: <19030.11925.370937.608524@gargle.gargle.HOWL> <20090710100721.56b0874c@news01> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9552/Fri Jul 10 14:30:33 2009 on bifrost X-Virus-Status: Clean >>>>> Peter Stephenson writes: > prepaths comes from the -W option (see the zparseopts call), which is used > when you want the file matcher to behave as if there was a path > prefix---for example, to complete folders in your mail directory, you might > use "-W ~/Mail". Right, I'd kinda surmised it was something like that. > I think the reason it's not an empty array is that matches are eventually > generated in a loop over all -W paths. If there are none, we still want to > execute that loop once, but with an empty prepath (at line 340): > for prepath in "$prepaths[@]"; do So do you agree it's a bug that it's stat-ing the path with the ~user/ stripped off, effectively then relative to the current directory? So, if it needs to go through that loop at least once, then maybe when 'prepath' (singular) is '' it should be prepending any stuff that got stripped off the front back on? Guess I'll have to grovel through there and try to make sense of what's going on... Greg