Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compctl whitespace changes

On 2001-08-08 at 16:03 +0000, Bart Schaefer wrote:
> Better might be
>     _lmutt () { local maildirectory=~/Mail/Lists; _mutt "$@" }

Okay, this has helped with my understanding a lot by pointing me at
things to examine.  Thanks.  However, its not correct by the spec I
gave.  lmutt takes _just_ the name of the mailbox as a parameter, not
with a -f.  So I'd say "lmutt zsh bugtraq" and, inside a loop over zsh &
bugtraq I'd fiddle with the xterm title (if appropriate) and start:
 mutt -f "+Lists/$i"

But Sven's answer works fine, module correcting "bin".

Looking into _mutt, I've seen a problem with Maildirs support.

With Maildir, you have your main Maildir, eg ~/Maildir/, and you can
have folders inside that, each of which has a name starting with a
period.  The normal one is .Trash, but others can be created.  The
current stuff doesn't handle this at all -- you might want a glob_dots
modifier in there.  Ideally mutt would understand folders itself, but
even so I'd still want zsh's tab-completion to allow me to start on a
folder.  :^)

So, what's happening here?  If I do "mutt -f +<TAB>" then I get a list
of files in the default $maildirectory.  If I do:
 compdef _imutt imutt
 _imutt () { setopt localoptions globdots; local
   maildirectory=~/Maildir; _mutt "$@" }
then when I do "imutt -f +<TAB>" I get nothing.  I've looked at the
special maildir handling, and AFAICS in _mailbox_cache() $dirboxes
should get the dot-directories and the while-loop should be happy, since
each folder contains its own {cur,new,tmp}/ ... but it's failing.  Que?

At the moment, I'll stick with the imutt() which is like lmutt() and
uses a compctl like the original one I gave, despite the fact that I
need to *gasp* press space myself manually because -W doesn't handle
names starting with a dot.

Do people feel that a supplied patch to add Maildir support into
$mailpath would be appropriate?  I'm happy to do the work, if it's not
considered a bad idea.

Thanks for the help,
Pentiums melt in your PC, not in your hand.

Messages sorted by: Reverse Date, Date, Thread, Author