From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2461 invoked from network); 25 Oct 2000 07:41:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Oct 2000 07:41:24 -0000 Received: (qmail 19637 invoked by alias); 25 Oct 2000 07:41:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13079 Received: (qmail 19630 invoked from network); 25 Oct 2000 07:41:18 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: Subject: RE: still confused about completion and matching Date: Wed, 25 Oct 2000 11:41:14 +0400 Message-ID: <000601c03e56$f39287f0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-reply-to: <200010250712.JAA23765@beta.informatik.hu-berlin.de> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > To Bart and Andrej: the lines Jay is referring to are: > > + [[ $compstate[unambiguous_cursor] -gt $#compstate[unambiguous] ]] && > + ins=yes compstate[insert]="$ocsi" > compstate[pattern_insert]="$ocspi" > > These are new and don't have anything to do with the > insert-unambiguous style. > O.K. I have not followed these patches ... > > > > That is the problem. It means, that if you have long pattern that > results in > > short match, menu completion is started. > > > > I was never happy about it as well. But I switched to menu > selection some time > > ago :-) > > Any suggestions about making this more clever or the results more > intuitive are welcome ;-) > This condition predates styles. Now we do have suitable means for users to configure desired behaviour. As I said long ago, I did not want Zsh to decide for me when to start menu completion if I did not request it. I do not want to invent another condition. > As I sais in one of the previous mails, I wasn't completely happy with > that condition myself. The problem is that we certainly don't want to > insert the unambiguous string unconditionally even if insert-unambig > is set, because that string might often be empty. > First, why are you _so_ sure there won't be any common prefix? For people that know shell glob patterns by heart it is sometimes easier to type pattern than to invent matching specification. And matches for foobar[1-9] are always shorter than pattern itself. Second, how does it differ from ordinary completion? The sole thing I wanted - let's treat completion and matching equally. Both give you a set of matches to select from. Let's use common rules to decide when and how these matches are inserted. (After all, "ordinary" completion is just matching with pattern $PREFIX*$SUFFIX ... even if not implemented this way. I do not see why $PREFIX?#$SUFFIX should be treated differently :-) cheers -andrej