From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13235 invoked from network); 7 Jan 2009 20:10:39 -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 news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Jan 2009 20:10:39 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 62940 invoked from network); 7 Jan 2009 20:10:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Jan 2009 20:10:34 -0000 Received: (qmail 13505 invoked by alias); 7 Jan 2009 20:10:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26252 Received: (qmail 13488 invoked from network); 7 Jan 2009 20:10:29 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 7 Jan 2009 20:10:29 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id DD982806EE5F for ; Wed, 7 Jan 2009 21:09:46 +0100 (CET) Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090107200940.RNXN2989.mtaout01-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com>; Wed, 7 Jan 2009 20:09:40 +0000 Received: from pws-pc ([81.107.45.176]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090107200940.GHAK19264.aamtaout01-winn.ispmail.ntl.com@pws-pc>; Wed, 7 Jan 2009 20:09:40 +0000 Date: Wed, 7 Jan 2009 20:09:31 +0000 From: Peter Stephenson To: "Zsh Workers" Cc: 162291@bugs.debian.org Subject: Re: Bug in executable completion: unable to handle .. it $PATH Message-ID: <20090107200931.77a5a23d@pws-pc> In-Reply-To: <2d460de70901010824x77d16ebfrf571e481795095e3@mail.gmail.com> References: <2d460de70901010824x77d16ebfrf571e481795095e3@mail.gmail.com> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.14.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=kI8piTFKFJUA:10 a=JUj8VBuOHUUA:10 a=GoxEX8pW62cf0LPdKHIA:9 a=d6VN9kQtLYgQf-Ow7QEA:7 a=wdxABwcQfoUWK-Spvm2DU1oMsvIA:4 a=LY0hPdMaydYA:10 a=ZfyWQJYG1gAA:10 X-Virus-Scanned: ClamAV 0.92.1/8842/Wed Jan 7 15:06:50 2009 on bifrost X-Virus-Status: Clean On Thu, 1 Jan 2009 17:24:17 +0100 "Richard Hartmann" wrote: > [the shell won't hash paths containing ".."] This is done explicitly in the code, but I have no idea why; it precedes the CVS archive. The function isrelative() is only used by hashdir(). Index: Src/exec.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/exec.c,v retrieving revision 1.162 diff -u -r1.162 exec.c --- Src/exec.c 17 Nov 2008 16:56:42 -0000 1.162 +++ Src/exec.c 7 Jan 2009 20:05:35 -0000 @@ -795,11 +795,16 @@ { if (*s != '/') return 1; +#if 0 + /* + * Eh? .. or . in the path doesn't make the directory relative. + */ for (; *s; s++) if (*s == '.' && s[-1] == '/' && (s[1] == '/' || s[1] == '\0' || (s[1] == '.' && (s[2] == '/' || s[2] == '\0')))) return 1; +#endif return 0; } Index: Src/hashtable.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/hashtable.c,v retrieving revision 1.30 diff -u -r1.30 hashtable.c --- Src/hashtable.c 1 Nov 2008 01:19:35 -0000 1.30 +++ Src/hashtable.c 7 Jan 2009 20:05:35 -0000 @@ -588,7 +588,7 @@ /**/ mod_export char **pathchecked; - + /* Create a new command hash table */ /**/