From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11951 invoked from network); 26 Jun 2001 08:04:22 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jun 2001 08:04:22 -0000 Received: (qmail 11763 invoked by alias); 26 Jun 2001 08:03:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15086 Received: (qmail 11742 invoked from network); 26 Jun 2001 08:03:30 -0000 From: Sven Wischnowsky Date: Tue, 26 Jun 2001 10:02:19 +0200 (MET DST) Message-Id: <200106260802.KAA23650@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: [zsh 4.0.1 bug] filename completion In-Reply-To: <1010626051501.ZM24562@candle.brasslantern.com> [ moved to -workers ] Bart Schaefer wrote: > ... > > I fooled around with _cd a bit and got something that works, but I'm not > happy with it, so I'm going to hope that Sven has a better idea of what's > going on. I've now fooled around a bit, too, and first couldn't get it to fail, because I don't have cdpath set. So my comment is that I don't understand the code in _cd at all. Why do we test for cdablevars only if `$#cdpath -ne 0'? It works without. And then the test for when cdablevars should be used: it's obviously wrong (that's the real reason for the bug). We should complete parameter names[1] if there is no slash in the word or if we are before the first slash. Otherwise we could check if there is no directory matching the string before the first slash but a parameter with that name -- and only in that case should we trick _path_files into completing a word with the parameter name replaced by the value of the parameter. Otherwise completing `soft/f' might surprise users who would expect it to complete to `software/foo'. Bye Sven [1] Or user names. Urgh. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de