summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Type/_email_addresses4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d2686e186..c6fd6c10a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-15  Oliver Kiddle  <opk@zsh.org>
+
+	* 19377 based on 19375 (Laurent Rineau):
+	Completion/Unix/Type/_email_addresses: handle better
+	situation where MH is not installed
+
 2004-01-15  Peter Stephenson  <pws@csr.com>
 
 	* 19374: Src/params.c: typo in 19361 caused crashes when
diff --git a/Completion/Unix/Type/_email_addresses b/Completion/Unix/Type/_email_addresses
index 3d2ce2911..8c17ed066 100644
--- a/Completion/Unix/Type/_email_addresses
+++ b/Completion/Unix/Type/_email_addresses
@@ -22,7 +22,7 @@ _email-mail() {
 
 (( $+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 @@ _email_addresses() {
   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]} ):')