From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8738 invoked from network); 18 Sep 2000 10:00:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Sep 2000 10:00:56 -0000 Received: (qmail 29092 invoked by alias); 18 Sep 2000 09:59:51 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3437 Received: (qmail 29085 invoked from network); 18 Sep 2000 09:59:51 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "E. Jay Berkenbilt" , Subject: insert-all-matches example RE: completion and globbing, part 2 Date: Mon, 18 Sep 2000 13:59:46 +0400 Message-ID: <000001c02157$2ceaa360$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <000701c0213d$2434b6d0$21c9ca95@mow.siemens.ru> > > May be, widget to do it (insert all current choices) would be the simplest > case. Hmm ... may be it is even possible to implement it as function. > Very dumb implemetation. It won't work (correctly) if anything is already inserted on command line - that is, it will insert all matches directly after anything already there. This may or may not be appropriate. bor@itsrm2% which _insert_all_matches _insert_all_matches () { compstate[insert]=all compstate[old_list]=keep _complete } bor@itsrm2% zle -C insert-all-matches complete-word _insert_all_matches bor@itsrm2% bindkey '^Xi' insert-all-matches With these you could do: bor@itsrm2% ls f*^D bor@itsrm2% ls f* Completing file fnt/ foo.c Now press ^Xi bor@itsrm2% ls fnt foo.c But, as stated, it has all sorts of problems. It does not work correctly after *completion* - it tries to complete word already inserted (that is, it is treated as new completion instead of continuation of old - but this may be related to my styles settings). ^D is needed to get a list that is inserted with ^Xi. -andrej