zsh-workers
 help / color / mirror / code / Atom feed
* _email_adresses, if MH is not installed.
@ 2004-01-15 14:00 Laurent Rineau
  2004-01-15 15:11 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Rineau @ 2004-01-15 14:00 UTC (permalink / raw)
  To: zsh-workers

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.

What about the following patch ?

--- /usr/local/util/packages/zsh-4.1.1/functions_source/functions/_email_addresses      Sat Jul  5 15:08:05 2003
+++ .zsh_funcs/_email_addresses Thu Jan 15 14:57:57 2004
@@ -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_profile mutt ~/.muttrc mush ~/.mushrc mail ${MAILRC:-~/.mailrc} pine ~/.addressbook )
   plugins=( 
     ${${(k)functions[(I)_email-*]#*-}:#(${(kj.|.)~files})}
     $files(Ne:'REPLY=( ${(k)files[(r)$REPLY]} ):')


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: _email_adresses, if MH is not installed.
  2004-01-15 14:00 _email_adresses, if MH is not installed Laurent Rineau
@ 2004-01-15 15:11 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2004-01-15 15:11 UTC (permalink / raw)
  To: Laurent Rineau; +Cc: zsh-workers

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]} ):')


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-15 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-15 14:00 _email_adresses, if MH is not installed Laurent Rineau
2004-01-15 15:11 ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).