zsh-workers
 help / color / mirror / code / Atom feed
* bug: mutt completion doesn't complete address book
@ 2006-10-13  0:12 arno.
  2006-10-21  9:15 ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: arno. @ 2006-10-13  0:12 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

Hi,
when I try to use completion with mutt, it is supposed to display my 
address book, but instead only completes with local addresses.

$mutt <TAB>
arno root games ...

That's because in Completion/Unix/_email_addresses
variable muttrc is defined with : muttrc="~/.muttrc"
and ~ seems to be not expanded when used in :

plugins=(
    ${${(k)functions[(I)_email-*]#*-}:#(${(kj.|.)~files})}
    $files(Ne:'REPLY=( ${(k)files[(r)$REPLY]} ):')
)
and therefore, _email-mutt is not triggered.

When removing the double quotes, completion works fine.

On IRC, ft also pointed another solution : 
use ${~muttrc} instead of $muttrc in :
 files=( MH ${MH:-~/.mh_profile} mutt $muttrc mush ~/.mushrc mail ${MAILRC:-~/.mailrc} pine ~/.addressbook )

arno


Index: Completion/Unix/Type/_email_addresses
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_email_addresses,v
retrieving revision 1.4
diff -u -r1.4 _email_addresses
--- Completion/Unix/Type/_email_addresses	8 Jun 2005 12:08:06 -0000	1.4
+++ Completion/Unix/Type/_email_addresses	13 Oct 2006 00:03:06 -0000
@@ -129,7 +129,7 @@
 
   # get list of all plugins except any with missing config files
   if ! zstyle -s ":completion:${curcontext}:email-addresses" muttrc muttrc; then
-    [[ -e ~/mutt/muttrc ]] && muttrc="~/mutt/muttrc" || muttrc="~/.muttrc"
+    [[ -e ~/mutt/muttrc ]] && muttrc=~/mutt/muttrc || muttrc=~/.muttrc
   fi
   files=( MH ${MH:-~/.mh_profile} mutt $muttrc mush ~/.mushrc mail ${MAILRC:-~/.mailrc} pine ~/.addressbook )
   plugins=( 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2006-10-21 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-13  0:12 bug: mutt completion doesn't complete address book arno.
2006-10-21  9:15 ` Andrey Borzenkov
2006-10-21 17:16   ` Bart Schaefer

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).