From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18959 invoked from network); 30 Apr 2002 23:20:26 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 30 Apr 2002 23:20:26 -0000 Received: (qmail 13520 invoked by alias); 30 Apr 2002 23:20:03 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4909 Received: (qmail 13475 invoked from network); 30 Apr 2002 23:20:00 -0000 Date: Tue, 30 Apr 2002 16:18:04 -0700 From: "Kingsley G. Morse Jr." To: Marius Strom Cc: zsh-users@sunsite.dk Subject: Re: zsh Newbie wants to complete mutt email addresses or aliases Message-ID: <20020430161804.C6577@debian1.loaner.com> Reply-To: "Kingsley G. Morse Jr." References: <20020430143132.A1336@debian1.loaner.com> <20020430165402.K63229@alpha1.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020430165402.K63229@alpha1.net>; from marius@alpha1.net on Tue, Apr 30, 2002 at 04:54:02PM -0500 On Tue:16:54, Marius Strom wrote: > Take out the initial \s+ [...] Thanks! It worked! Two minor observations: 1.) Although the zstyle/perl code worked as we expected when I entered it at zsh's prompt, when I added it to .zshrc and subsequently started zsh, it reported "no such file or directory" until I appended the first two (out of three) lines of the code. The resulting .zshrc code that works for me is zstyle -e ':completion::complete:mutt:*:' users 'reply=($(perl -ne '\''print "$1\n" if /^\s*alias\s+(\S+)\s+.*/;'\'' ~/.muttrc 2> /dev/null ))' 2.) Now when I use to complete mutt's email aliases, the completed aliases sometimes end with an "@", which conveniently goes away when I press to run mutt. All in all... all's well that ends well. Marius: I like your lost cable signature. All: As a small token of my appreciation for your time and attention, here's a tame joke: Q: How much does it cost to pierce a pirate's ears? A: A buccaneer! Thanks, Kingsley