From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21769 invoked from network); 21 Jun 2000 15:21:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jun 2000 15:21:26 -0000 Received: (qmail 26133 invoked by alias); 21 Jun 2000 15:21:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12016 Received: (qmail 26126 invoked from network); 21 Jun 2000 15:21:16 -0000 From: "Bart Schaefer" Message-Id: <1000621152106.ZM31139@candle.brasslantern.com> Date: Wed, 21 Jun 2000 15:21:06 +0000 In-Reply-To: <20000621095529.A27178@br-online.de> Comments: In reply to Andy Spiegl "Re: bug in _mutt ?" (Jun 21, 9:55am) References: <20000619211650.A5701@br-online.de> <20000620132829.K23705@br-online.de> <20000620100216.A5814@scowler.net> <20000620171801.C3224@br-online.de> <20000621095529.A27178@br-online.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Andy Spiegl , zsh-workers@sunsite.auc.dk Subject: Re: bug in _mutt ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 21, 9:55am, Andy Spiegl wrote: } Subject: Re: bug in _mutt ? } } trace _mua_mailboxes:35(case)> mbox_names=( Mailboxes mailboxes Please note those first two entries in mbox_names, it's important later. } =sub/cus/rundbriefe =sub/cus/rundbriefe.muc =sub/mutt =sub/zsh } =sub/zsh-workers =sub/linux/linux-ug =sub/linux/debian.security } =sub/linux/debian.announce =sub/linux/debian.commercial } =sub/linux/debian.user.de =sub/linux/debian.user =sub/kira =sub/akte ) } } is being reduced to } } =sub =sub =sub =sub =sub =sub =sub =sub =sub =sub =sub =sub =sub } } Is that intended? Yes. That's the whole point of _multi_parts: it works like _path_files, but on strings that aren't necessarily file names. So you should find that if you type % mutt -f =sub it'll append the slash, and offer completions of cus mutt zsh zsh-workers linux kira akte } It would sound more logical to me if the full paths were kept. Why? (Some people have very wide and deep mailbox hierarchies ...) } And after } % muttf -f m } I get these completions offered: } mailbox specification } mailboxes } mailbox file } Mail/ movies/ mutt_1.2-1.deb } } Where does that "mailboxes" come from? It comes from _mbox_names, up above. I don't know why "Mailboxes" is not also offered, since "Mail/" seems to be. Now, how it got into _mbox_names is a different question. In the _mua_mailboxes helper function, you'll see (*:mutt:*) mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}" "${_maildir_cache[@]}" ) The _mutt_cache is initialized by grepping your .muttrc (or the file that you name in the $muttrc variable, which you should set somewhere in your .zshrc file if it's not ~/.muttrc) for the string "mailboxes" and then throwing away the first word of the result. So it could be coming from there, if the grep is finding more words in .muttrc than Clint expected (he wrote the original _mailboxes, I don't use mutt and have no idea what a .muttrc file looks like). The _mailbox_cache is all the files and directories under ~/Mail in your home directory (again, set $maildirectory in your .zshrc to change this). Unfortunately this caching means that you can't easily complete newly- created mailbox names, but it's intended to speed things up for people who have large numbers of mailboxes. (Myabe the new enhancements to _path_files are enough that we could do away with this?) Finally, the _maildir_cache is all the *subdirectories* of ~/Mail (or $maildirectory) that contain further subdirectories named "cur". This is crude support for a qmail mailbox format that stores messages as individual files in three subdirectories of a directory named for the mailbox. This is imprecise, as it means that if you happen to have a directory named "cur" it'll guess that the parent is a qmail mailbox. You have a directory named "cus" ... do you also have a "cur"? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net