From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1197 invoked from network); 21 Jun 2006 11:23:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Jun 2006 11:23:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 91183 invoked from network); 21 Jun 2006 11:23:12 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Jun 2006 11:23:12 -0000 Received: (qmail 29916 invoked by alias); 21 Jun 2006 11:23:04 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10404 Received: (qmail 29906 invoked from network); 21 Jun 2006 11:23:03 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Jun 2006 11:23:03 -0000 Received: (qmail 90080 invoked from network); 21 Jun 2006 11:23:03 -0000 Received: from parhelion.firedrake.org (193.201.200.77) by a.mx.sunsite.dk with SMTP; 21 Jun 2006 11:23:02 -0000 Received: from phil by parhelion.firedrake.org with local (Exim 4.50 #1 (Debian)) id 1Ft0nU-0007vz-En for ; Wed, 21 Jun 2006 12:23:00 +0100 Date: Wed, 21 Jun 2006 13:23:00 +0200 From: Phil Pennock To: Zsh Users Subject: mail paths and IMAP Message-ID: <20060621112300.GA28907@parhelion.globnix.org> Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: Phil Pennock 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 + % 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 +" part, so that I can use the _mbox_cache hack above? Thank you, -- VISTA: Viruses, Infections, Spyware, Trojans & Adware