From: Phil Pennock <phil.pennock@globnix.org>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: mail paths and IMAP
Date: Wed, 21 Jun 2006 13:23:00 +0200 [thread overview]
Message-ID: <20060621112300.GA28907@parhelion.globnix.org> (raw)
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
next reply other threads:[~2006-06-21 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 11:23 Phil Pennock [this message]
2006-06-27 9:45 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060621112300.GA28907@parhelion.globnix.org \
--to=phil.pennock@globnix.org \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).