From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21165 invoked from network); 4 Aug 2000 08:39:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Aug 2000 08:39:19 -0000 Received: (qmail 3633 invoked by alias); 4 Aug 2000 08:38:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12527 Received: (qmail 3604 invoked from network); 4 Aug 2000 08:38:33 -0000 Date: Fri, 4 Aug 2000 10:38:28 +0200 (MET DST) Message-Id: <200008040838.KAA27933@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Fri, 4 Aug 2000 07:36:24 +0000 Subject: Re: Long-option completion bug Bart Schaefer wrote: > zagzig[300] ../zsh-3.1.6/configure --w > zagzig[300] ../zsh-3.1.6/configure ---zsh-mem-warning > ^ > cursor here; too many hyphens. Err...? The reported number of hyphens and the cursor position is correct if you look at the possible completions: % ./configure --w % ./configure ---zsh-mem-warning --disable-zsh-mem-warning --enable-zsh-mem-warning > This probably has something to do with my match specs. > > zstyle ':completion:*' matcher-list \ > '' 'r:|[._-,]=* r:|=*' 'm:{a-zA-Z}={A-Za-z} r:|[._-,]=* r:|=*' \ > 'r:|[._-,]=* r:|=* l:|=*' That last one, of course, is the explanation why `--w' matches the option at all (the leading two hyphens can be inserted because of the `l:|=*'). > (Side note: I keep thinking I probably want ** instead of * in at least > one of those, but I'm not sure which.) Oh, a trick question. Hm, let's see. You won't want it in any of the `r:|=*' nor in the `l:|=*' because that should give the same results. So it can be only one of the other `r:...'s. Since using '' as the first spec shows that you are careful, you probably don't want it in the second match spec... Sorry ;-) But look at those character classes. `[._-,]'. That means `.' and everything between and including `_' and `,'. Since '_' > ',', the whole class is the same as `.'. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de