From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29248 invoked from network); 23 Mar 2001 19:29:21 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Mar 2001 19:29:21 -0000 Received: (qmail 10666 invoked by alias); 23 Mar 2001 19:29:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13737 Received: (qmail 10652 invoked from network); 23 Mar 2001 19:29:12 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: MH for Mailboxes (TM) Date: Fri, 23 Mar 2001 17:22:19 +0000 From: Peter Stephenson This makes _mailboxes a bit happier about MH mailboxes. I don't know whether to alter _mh_cache directly or change it at the point of use. The other change is to allow subfolders, which are already handled by _multi_parts where _mh_cache is used. It still doesn't handle the feature of MH (which I don't suppose anyone actually uses) that @folder is relative to the last folder you were looking at. This is why I tacked the + directly on the front, rather than assuming it's already present in the context --- it may in principle be an @. But in some ways it's more natural to forget about the + and assume it's somewhere in the ignored prefix if it's needed. MH itself is completely consistent about requiring + or @, so far as I know, so either way would probably work. It's not wired up to _mh. It's probably more than my job's worth to commit this. Index: Completion/User/_mailboxes =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_mailboxes,v retrieving revision 1.8 diff -u -r1.8 _mailboxes --- Completion/User/_mailboxes 2000/11/09 13:27:53 1.8 +++ Completion/User/_mailboxes 2001/03/23 17:15:14 @@ -83,7 +83,8 @@ if [[ -d "$i/cur" ]]; then _maildir_cache=( "${_maildir_cache[@]}" "$i" ) elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then - _mh_cache=( "${_mh_cache[@]}" "$i" ) + _mh_cache=( "${_mh_cache[@]}" "+${i#$~maildirectory/}" ) + dirboxes=( $dirboxes "$i"/*(/) ) else _mbox_cache=( "${_mbox_cache[@]}" "$i"/*(.) ) dirboxes=( $dirboxes "$i"/*(/) ) -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070