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

* Re: bug: mutt completion doesn't complete address book
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2006-10-21  9:15 UTC (permalink / raw)
  To: zsh-workers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nobody reoplied th this (22872) and 22868 and it was not committed either. 
Both look OK ti me. Should I go ahead and commit them or are there some 
reasons no to?

On Friday 13 October 2006 04:12, arno. wrote:
> 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=(
>
> __________
> http://www.newhost.ru - ÃîâÝëÙ ÔÞÜ ÔÛï ²ÐèÕÓÞ áÐÙâÐ!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFOeU1R6LMutpd94wRAg3gAKCtMEfkbVGMVvHYcXda5FOxRXmoFwCeKAcr
wjPOAhzUalcfNZuvtqVHvMk=
=A37j
-----END PGP SIGNATURE-----


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

* Re: bug: mutt completion doesn't complete address book
  2006-10-21  9:15 ` Andrey Borzenkov
@ 2006-10-21 17:16   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2006-10-21 17:16 UTC (permalink / raw)
  To: zsh-workers

(This one went into gmail's spam filter again.)

On Oct 21,  1:15pm, Andrey Borzenkov wrote:
} Subject: Re: bug: mutt completion doesn't complete address book
}
} nobody reoplied th this (22872) and 22868 and it was not committed either. 
} Both look OK ti me. Should I go ahead and commit them or are there some 
} reasons no to?

I think rather that the right fix is the following, but I could go either
way -- it depends on how the value returned by zstyle is supposed to be
treated:


Index: _email_addresses
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Completion/Unix/Type/_email_addresses,v
retrieving revision 1.3
diff -c -r1.3 _email_addresses
--- _email_addresses	11 Aug 2005 18:28:07 -0000	1.3
+++ _email_addresses	21 Oct 2006 17:15:09 -0000
@@ -131,7 +131,7 @@
   if ! zstyle -s ":completion:${curcontext}:email-addresses" muttrc muttrc; then
     [[ -e ~/mutt/muttrc ]] && muttrc="~/mutt/muttrc" || muttrc="~/.muttrc"
   fi
-  files=( MH ${MH:-~/.mh_profile} 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] 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).