From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25037 invoked from network); 17 Feb 2000 23:33:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Feb 2000 23:33:24 -0000 Received: (qmail 18557 invoked by alias); 17 Feb 2000 23:33:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9785 Received: (qmail 18549 invoked from network); 17 Feb 2000 23:33:13 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: completion after ../ References: <200001240910.KAA02702@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 18 Feb 2000 08:33:10 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article <200001240910.KAA02702@beta.informatik.hu-berlin.de>, Sven Wischnowsky writes: > Or maybe we write a completer (a real, top-level completer) that > registers a post-completion function which checks if there are only > alternate matches (or only one alternate match) and no normal one and, > if this is the case, makes a list be shown instead of the match(es) be > used. That would be quite easy (set compstate[insert]='', > compstate[list]='list force'), , but I'm not sure if this is enough or > the right thing at all. I tried this and I found it's enough for me. Of course, I agree that it's quite inconsistent behaviour and it shouldn't be default. So I want to insert following fragment at last in _main_complete. if zstyle -b ":completion:..." && [[ $compstate[old_list] != shown && $compstate[nmatches] = 0 && $compstate[alternate_nmatches] = 1 ]]; then compstate[insert]='' compstate[list]='list force' fi What's a proper context and a style? I couldn't find them. -- Tanaka Akira