Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _email_adresses, if MH is not installed.
- X-seq: zsh-workers 19377
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Laurent Rineau <rineau@xxxxxxxxxxxxxx>
- Subject: Re: _email_adresses, if MH is not installed.
- Date: Thu, 15 Jan 2004 16:11:46 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20040115140035.GA9546@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20040115140035.GA9546@xxxxxxxxxxxxxx>
Laurent Rineau wrote:
> If MH is not installed on the system, I get the following error :
>
> rineau@clipper ~ $ mutt rineau<TAB>(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]} ):')
Messages sorted by:
Reverse Date,
Date,
Thread,
Author