From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12378 invoked from network); 26 Jun 2001 09:03:34 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jun 2001 09:03:34 -0000 Received: (qmail 12034 invoked by alias); 26 Jun 2001 09:02:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3946 Received: (qmail 12017 invoked from network); 26 Jun 2001 09:02:37 -0000 From: Sven Wischnowsky Date: Tue, 26 Jun 2001 11:01:26 +0200 (MET DST) Message-Id: <200106260901.LAA24070@beta.informatik.hu-berlin.de> To: zsh-users@sunsite.dk Subject: Re: RE: [zsh 4.0.1 bug] filename completion In-Reply-To: <000501c0fe1a$e954fdc0$21c9ca95@mow.siemens.ru> Andrej Borsenkow wrote: > > > > _cd doesn't even try to complete other directories if the prefix is the > > name of a cdable variable, which is arguably wrong. > > > > I suspect it is part of more general problem. I have a feeling that handling > of exact match changed at some point near 4.0.1 release. Now zsh will prefer > exact match in any context while before I got menu selection ... and I am > sure none of my styles changed. > > E.g. I have /usr/lib{,64s}/netlib. Attempt to complete /u/l/n always > completes /usr/lib/netlib. Styles are: Oops. You are right, that test in `compfiles -r' was too stupid (its the test used in the loop that finds the first ambiguous component and it didn't add a slash when comparin in-path components, so it thought `lib' was the same as `lib64s' in this case). And yes, this also makes it offer both `soft' and `software' in that other case. I'm still not overly happy with the code in _cd, though. This should go into 4.0.2, too, I think. Bye Sven Index: Src/Zle/computil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v retrieving revision 1.61 diff -u -r1.61 computil.c --- Src/Zle/computil.c 2001/06/19 15:46:54 1.61 +++ Src/Zle/computil.c 2001/06/26 09:02:09 @@ -3719,6 +3719,8 @@ if ((q = strchr((p = dupstring(p)), '/'))) *q = '\0'; + p = dyncat(p, "/"); + for (; *names; names++) if (!strpfx(p, *names)) { *amb = 1; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de