From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25634 invoked from network); 22 Jan 2005 22:23:27 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Jan 2005 22:23:27 -0000 Received: (qmail 61012 invoked from network); 22 Jan 2005 22:23:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Jan 2005 22:23:21 -0000 Received: (qmail 18449 invoked by alias); 22 Jan 2005 22:22:52 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8418 Received: (qmail 18436 invoked from network); 22 Jan 2005 22:22:52 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 22 Jan 2005 22:22:52 -0000 Received: (qmail 59693 invoked from network); 22 Jan 2005 22:22:16 -0000 Received: from out014pub.verizon.net (HELO out014.verizon.net) (206.46.170.46) by a.mx.sunsite.dk with SMTP; 22 Jan 2005 22:22:11 -0000 Received: from candle.brasslantern.com ([4.11.10.129]) by out014.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050122222209.PSZZ28388.out014.verizon.net@candle.brasslantern.com> for ; Sat, 22 Jan 2005 16:22:09 -0600 Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j0MMM72I015967 for ; Sat, 22 Jan 2005 14:22:07 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j0MMM7PV015966 for zsh-users@sunsite.dk; Sat, 22 Jan 2005 14:22:07 -0800 From: Bart Schaefer Message-Id: <1050122222206.ZM15965@candle.brasslantern.com> Date: Sat, 22 Jan 2005 22:22:06 +0000 In-Reply-To: <20050120182025.GA26932@fruitcom.com> Comments: In reply to Eric Smith "completion function with compadd" (Jan 20, 7:20pm) References: <20050120182025.GA26932@fruitcom.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: completion function with compadd MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Authentication-Info: Submitted using SMTP AUTH at out014.verizon.net from [4.11.10.129] at Sat, 22 Jan 2005 16:22:08 -0600 X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Jan 20, 7:20pm, Eric Smith wrote: } } Is it possible to complete on words within that file. } The example I am looking for is my mutt aliases Is there something not working for you if you use the mutt completer that's included in the zsh distribution? Theoretically, it handles mutt alias files just fine. If for some reason it doesn't, you can create your own plugin function called "_email-mutt" to do the work. (Unfortunately the interface to the plugin is rather poorly documented, but there are examples in the Completion/Unix/Type/_email_addresses file.) Just be sure you define the plugin function before you load the _email_addresses file. (Autoloading both should work fine.) } mutt alice@inwonderland.com } } and not } mutt alias aw "Alice in Wonderland" For that specific example, assuming that you've somehow assigned the line from the file to the variable $line, you'd want something like compadd ${line/(#b)*<(*)>/$match[1]} (which assumes extendedglob is set, but it always is in completion).