From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17796 invoked from network); 15 Dec 1999 15:29:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Dec 1999 15:29:14 -0000 Received: (qmail 1341 invoked by alias); 15 Dec 1999 15:29:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9059 Received: (qmail 1334 invoked from network); 15 Dec 1999 15:29:09 -0000 Date: Wed, 15 Dec 1999 16:29:08 +0100 (MET) Message-Id: <199912151529.QAA07056@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Wed, 15 Dec 1999 14:16:21 +0300 Subject: Re: _approximate and _path_files Andrej Borsenkow wrote: > Do they work together? Assuming that I have directory /archive/sni/mr, > > cd /archive; l sin > > gives me `sni' > > but simple > > l /ar/sin > > after *very* long time beeps. > > If not - it's really a pity. > > Actually, enabling _approximate (I have max-erros 3) and trying to complete any > non-existing partial path takes really long time. Hmm ... looks, like zsh simply > hangs (or better said, loops) currently. I have to press ^C to be able to enter > something. ^C then returns to my input I tried to complete. Damn, damn, damn. We lost this when we made braces in path prefixes and suffixes work. The problem is that the compadd function _approximate uses sticks the (#a...) at the beginning of the whole string and then the C-code thinks that this doesn't match because it doesn't compare the whole strings (including the prefixes and suffixes), and that is the other way to look at the problem. We can't just make the compadd() in _approximate to put the (#a...) somewhere else because we don't know anything about separator characters used in the calling function. So we have to fix it in C... and I don't know yet how this is done best (without losing too much of, e.g., the prefix matching stuff). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de