From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10072 invoked from network); 14 Dec 2000 07:18:22 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Dec 2000 07:18:22 -0000 Received: (qmail 7123 invoked by alias); 14 Dec 2000 07:18:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13267 Received: (qmail 7116 invoked from network); 14 Dec 2000 07:18:14 -0000 Date: Thu, 14 Dec 2000 08:18:11 +0100 (MET) Message-Id: <200012140718.IAA26085@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Wed, 13 Dec 2000 16:42:12 +0000 Subject: Re: Some problem with completion matching Bart Schaefer wrote: > On Dec 13, 6:52pm, Andrej Borsenkow wrote: > } > } bor@itsrm2% l ntpd/*.c > } ntpd/check_y2k.c ntpd/map_vme.c > } ntpd/ntp_config.c ntpd/ntp_control.c > } ntpd/ntp_crypto.c ntpd/ntp_filegen.c > } ..... etc > } bor@itsrm2% l ntpd/.cTAB > } bor@itsrm2% l ntpd/ntpd.c > } Completing file > } ntpd.c version.c > } > } ??? > } > } bor@itsrm2% zstyle -L > } zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-z}={A-Z} > } r:|[._-]=* r:|=*' 'm:{a-z}={A-Z} r:|[.-]=** r:|=**' > ^^^^^^^^^^ > I *think* the behavior you're seeing is correct, but Sven will have to > confirm. The match spec I marked means that file names are to split into > segments at dot, underscore, and hyphen, for purposes of matching. The > doc says that "... the anchor can occur anywhere, but must match in both > the command line and trial completion strings." Since there's only one > match for the anchor on the command line, only files having a single > such segment are eligible for completion. That's right. And it's the reason why I added -- on Andrej's request -- the `**'-thing. So, if you (Andrej) remove your third (including the '') matcher so that the 'm:{a-z}={A-Z} r:|[._-]=** r:|=**' is the third one, it'll work. What's irritating you is probably that you seem to get different behaviours depending on the directory contents. That's of course because you used `**' in the last matcher. If there is at least one file with only one of the anchor characters, the third one matches and you don't see any of the other matches. If all files have at least two anchor characters, you see all of them because the third matcher doesn't help but the last matcher makes them be matched. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de