From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21522 invoked from network); 15 Jan 2004 15:07:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Jan 2004 15:07:10 -0000 Received: (qmail 22811 invoked by alias); 15 Jan 2004 15:07:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19377 Received: (qmail 22789 invoked from network); 15 Jan 2004 15:07:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Jan 2004 15:07:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [193.109.254.211] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Jan 2004 15:7:0 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-6.tower-36.messagelabs.com!1074179218!3151596 X-StarScan-Version: 5.1.15; banners=-,-,- Received: (qmail 3845 invoked from network); 15 Jan 2004 15:06:58 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-6.tower-36.messagelabs.com with SMTP; 15 Jan 2004 15:06:58 -0000 Received: from gmcs3.local ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i0FF6wuB016019; Thu, 15 Jan 2004 15:06:58 GMT Received: from gmcs3.local (localhost [127.0.0.1]) by gmcs3.local (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id i0FFBkI11790; Thu, 15 Jan 2004 16:11:46 +0100 cc: zsh-workers@sunsite.dk X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <20040115140035.GA9546@clipper.ens.fr> From: Oliver Kiddle References: <20040115140035.GA9546@clipper.ens.fr> To: Laurent Rineau Subject: Re: _email_adresses, if MH is not installed. Date: Thu, 15 Jan 2004 16:11:46 +0100 Message-ID: <11788.1074179506@gmcs3.local> Laurent Rineau wrote: > If MH is not installed on the system, I get the following error : > > rineau@clipper ~ $ mutt rineau(eval):1: command not found: ali > @ > > The reason is that the external program 'ali' is not installed and > _email_adresses does not test if MH is used. Thanks for spotting this. > What about the following patch ? I've adapted it slightly. Normally we get around this problem with a 2>/dev/null. In this case, requiring ~/.mh_profile too is probably wise since if it doesn't exist, ali will create it. Also, the MH environment variable can specify an alternate rc file. So I'll commit this below: Index: Completion/Unix/Type/_email_addresses =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_email_addresses,v retrieving revision 1.2 diff -u -r1.2 _email_addresses --- Completion/Unix/Type/_email_addresses 29 Jan 2003 14:21:13 -0000 1.2 +++ Completion/Unix/Type/_email_addresses 15 Jan 2004 14:58:36 -0000 @@ -22,7 +22,7 @@ (( $+functions[_email-MH] )) || _email-MH() { - reply=( ${${(f)"$(_call_program aliases ali)"}/: /:} ) + reply=( ${${(f)"$(_call_program aliases ali 2>/dev/null)"}/: /:} ) return 300 } @@ -119,7 +119,7 @@ fi # get list of all plugins except any with missing config files - files=( mutt ~/.muttrc mush ~/.mushrc mail ${MAILRC:-~/.mailrc} pine ~/.addressbook ) + files=( MH ${MH:-~/.mh_profile} mutt ~/.muttrc mush ~/.mushrc mail ${MAILRC:-~/.mailrc} pine ~/.addressbook ) plugins=( ${${(k)functions[(I)_email-*]#*-}:#(${(kj.|.)~files})} $files(Ne:'REPLY=( ${(k)files[(r)$REPLY]} ):')