From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17455 invoked from network); 30 Apr 2002 21:33:46 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 30 Apr 2002 21:33:46 -0000 Received: (qmail 21223 invoked by alias); 30 Apr 2002 21:33:25 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4905 Received: (qmail 21201 invoked from network); 30 Apr 2002 21:33:22 -0000 Date: Tue, 30 Apr 2002 14:31:32 -0700 From: "Kingsley G. Morse Jr." To: Bart Schaefer Cc: zsh-users@sunsite.dk Subject: Re: zsh Newbie wants to complete mutt email addresses or aliases Message-ID: <20020430143132.A1336@debian1.loaner.com> Reply-To: "Kingsley G. Morse Jr." References: <20020430193409.GA3875@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from schaefer@brasslantern.com on Tue, Apr 30, 2002 at 01:17:26PM -0700 Bart, Thanks for the code. I'm OK with just completing aliases and appreciate your pragmatic approach. However, probably due to my inexperience, I was unable to get your code to work after 1.) deleting the hard coded email addresses, leaving zstyle -e ':completion::complete:mutt:*:' users \ 'reply=($(perl -ne '\''print "$1\n" if /^\s+alias\s+(\S+)\s+.*/;'\'' ~/.muttrc 2>/dev/null))' 2.) putting it in .zshrc and restarting zsh, and failing that, 3.) entering it at zsh's prompt. When I press after typing the start of an alias, ie: $ mutt -s "A silly subject" Joe_Do zsh returns the same error message as before: No matches for: `recipient', `login name', `user', or `corrections' Since I'm so new to zsh, perhaps you can easily suggest what I might try doing differently. Thanks, Kingsley to work On Tue:13:17, Bart Schaefer wrote: > > zstyle -e ':completion::complete:mutt:*:' users \ > 'reply=($(perl -ne '\''print "$1\n" > if /^\s+alias\s+(\S+)\s+.*/;'\'' ~/.muttrc 2>/dev/null) > otheraddress@notinmuttrc.com > anotheraddress@whoknowswhere.com > etcetc@andsoforth.net)' > > You can probably figure out how to extend this to emit the addresses > from the muttrc alias lines instead of just the alias keywords. --