From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7350 invoked from network); 20 Aug 2006 03:17:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Aug 2006 03:17:08 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 86594 invoked from network); 20 Aug 2006 03:17:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Aug 2006 03:17:00 -0000 Received: (qmail 25099 invoked by alias); 20 Aug 2006 03:16:52 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10626 Received: (qmail 25088 invoked from network); 20 Aug 2006 03:16:52 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Aug 2006 03:16:52 -0000 Received: (qmail 85487 invoked from network); 20 Aug 2006 03:16:52 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 20 Aug 2006 03:16:49 -0000 Received: from torch.brasslantern.com ([71.121.0.226]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J4A007ME13HYXX0@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 19 Aug 2006 22:16:30 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k7K3GSH2028981 for ; Sat, 19 Aug 2006 20:16:29 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k7K3GRfq028980 for zsh-users@sunsite.dk; Sat, 19 Aug 2006 20:16:27 -0700 Date: Sat, 19 Aug 2006 20:16:27 -0700 From: Bart Schaefer Subject: Re: How to insert completions on command line In-reply-to: <20060819234130.GA11224@ay.vinc17.org> To: zsh-users@sunsite.dk Message-id: <060819201627.ZM28979@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <237967ef0608181647v2c9d526evd1afa34d9b0a366d@mail.gmail.com> <060818205326.ZM24653@torch.brasslantern.com> <237967ef0608182215q2b59fdb0w5f645f72385a9508@mail.gmail.com> <060819111754.ZM28540@torch.brasslantern.com> <20060819234130.GA11224@ay.vinc17.org> Comments: In reply to Vincent Lefevre "Re: How to insert completions on command line" (Aug 20, 1:41am) On Aug 20, 1:41am, Vincent Lefevre wrote: } Subject: Re: How to insert completions on command line } } On 2006-08-19 11:17:54 -0700, Bart Schaefer wrote: } > zle -C all-matches complete-word _generic } > bindkey '^Xa' all-matches } > zstyle ':completion:all-matches:*' old-matches only } > zstyle ':completion:all-matches::::' completer _all_matches } } I've tried for instance: mail ^Xa } but the ^Xa has no effect, whereas [Tab] lists all the possible } completions. I had forgotten (and the manual, from which I copied those lines, doesn't state directly) how _all_matches works. You have to first generate the list of completions with a normal completer (such as by pressing tab) and then type ^Xa to insert them on the line. _all_matches doesn't generate any completions of its own. To get the effect of having ^Xa both generate and insert completions, you need: zle -C all-matches complete-word _generic bindkey '^Xa' all-matches zstyle ':completion:all-matches:*' insert yes zstyle ':completion:all-matches::::' completer \ _all_matches _complete Replace or augment _complete with whatever other completers you want, but _all_matches must come first.