From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16393 invoked from network); 9 Mar 1999 13:10:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Mar 1999 13:10:46 -0000 Received: (qmail 15772 invoked by alias); 9 Mar 1999 13:10:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5705 Received: (qmail 15752 invoked from network); 9 Mar 1999 13:09:58 -0000 Date: Tue, 9 Mar 1999 14:09:14 +0100 (MET) Message-Id: <199903091309.OAA14118@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Tue, 9 Mar 1999 13:47:09 +0300 Subject: RE: PATCH: (was Re: _configure does not work) Andrej Borsenkow wrote: > > > itsrm2% ./configure --e-d > > > itsrm2% ./configure > > > (the whole stuff deleted) > > > > > > I'd thought, it completed to at least --enable-dynamic before. > > > > I think it didn't, I think it generated a list containing > > `--enable-dynamic', `--enable-zsh-debug' and others. This was wrong in > > the matching code in zle_tricky.c. > > > > Why? I had impression, it was the result of matcher. If I say -M 'r:|-=* > r:|=*', then ``--e-d'' inevitably matches enable-zsh-debug. Should it not be > handled in matcher spec? "anything except -"? This is slightly modeled after globbing behavior: anchors of `*' patterns separate parts like slashes separate pathname components. Inside the word they all have to be typed explicitly. Personally, I like this behavior much better than the `* matches even it's anchors' (I wanted this behavior from the beginning, so I consider the patch to be a bug fix), because an important goal of completion is to produce as few matches as possible -- even if this may sound strange. About making match specs more powerful: with the code as it is now, it would be easier to support a pattern for `match a couple of characters like ...', where the `...' is a character or character-class. However, implementing full support for `r:|.=[^.]#' would be very complicated, since people would immediatly expect all the patterns they know from globbing to be understood. The problem is that the code not only has to do matching (that would be easy, just use the globbing code), but also to build the strings to put in the line and in the match-structure. So, I'll think about this some more once I have done the things I want to do in the matching/joining code anyway. But probably I would just prefer a simple yse/no choice: a `*' that matches it's anchors and one that doesn't do that. Of course, I'd also like to hear other people's opinion on this -- that would also give me a hint how many of you use such patterns. Bye Sven P.S.: To get the previous behavior, just de-apply the first two hunks of the patch to zle_tricky.c. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de