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:
signature.asc
Description: Digital signature