zsh-users
 help / color / mirror / code / Atom feed
* mail paths and IMAP
@ 2006-06-21 11:23 Phil Pennock
  2006-06-27  9:45 ` Phil Pennock
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Pennock @ 2006-06-21 11:23 UTC (permalink / raw)
  To: Zsh Users

Hi,

I'm having trouble twisting the new completion system to another of my
whims.  I'd like to be able to tab-complete IMAP mail-folders.  I have
GSSAPI authentication, so no password prompt is needed, and I have a
tool which will list all subscribed folders, one per line.  I can make
this work interactively, but want to automate it.  Could someone please
point me to which bit of the completion system I need to be using to do
this (preferably a snippet, if it's "just" configuration):

If I type:

% mutt -f +<TAB><Ctrl-C>
% klist -t && set -A _mbox_cache ${(@f):-"$(mailcheck -B -l 2>/dev/null)"}

(and have mutt "set folder=imap://$IMAP_SERVER/") then I can
tab-complete as desired.

The problem is setting this up to work without first kicking _mailboxes
into life, to create the cache.  I know that the above is bad and wrong
because it's messing with internals.

I can set explicit IMAP URLs into $mailpath, but that doesn't help since
zsh isn't too happy with the URLs:

% set -A mailboxes imap://$IMAP_SERVER/${^${(@f):-"$(mailcheck -B -l 2>/dev/null)"}// /%20}

Is there a way to do this "properly" without changing the completion
widgets?  Failing that, is there a way to initialise the stuff without
typing in the "mutt -f +<TAB>" part, so that I can use the _mbox_cache
hack above?

Thank you,
-- 
VISTA: Viruses, Infections, Spyware, Trojans & Adware


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

end of thread, other threads:[~2006-06-27  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 11:23 mail paths and IMAP Phil Pennock
2006-06-27  9:45 ` Phil Pennock

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