From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20178 invoked from network); 29 Mar 2001 08:36:57 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 2001 08:36:57 -0000 Received: (qmail 9898 invoked by alias); 29 Mar 2001 08:36:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13830 Received: (qmail 9883 invoked from network); 29 Mar 2001 08:36:50 -0000 Date: Thu, 29 Mar 2001 10:36:50 +0200 (MET DST) Message-Id: <200103290836.KAA20226@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: "Bart Schaefer"'s message of Wed, 28 Mar 2001 15:53:43 +0000 Subject: Re: PATCH: MH for Mailboxes (TM) Bart Schaefer wrote: > On Mar 28, 12:55pm, Sven Wischnowsky wrote: > } Subject: Re: PATCH: MH for Mailboxes (TM) > } > } > However, at _multi_parts line 164-166, the expression > } > > } > "${(@)${(@M)matches:#*${sep}}%%${sep}*}" > } > > } > expands to the empty string. Could that be the source of the problem? > } > } Yes, that may be. Even if it doesn't fix this particular problem, the > } patch below should only make things saver. > } > } Can someone try? > > I still get the blank item in the list after your patch. I think maybe > the problem is that tmp1 gets an empty element at line 94, which then > gets added as a match at line 120, but I tried duplicating your change > at line 94 without any better result. Hm. After setting up some parameters I was able to reproduce it. But for me changing lines 94 and 97 fixed it. So I'll commit the patch below anyway. > Does `compadd -a array' where the array is empty have a bad effect? No, that works nicely (having tried it with a simple test completion function). That _mailboxes function... there are some wrongly indented parts in it. And the `pinedirectory', `maildirectory' and `mailpath' parameters don't seem to be documented. Are these standard names? (In particular, mailpath even isn't a local.) Bye Sven Index: Completion/Core/_multi_parts =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_multi_parts,v retrieving revision 1.6 diff -u -r1.6 _multi_parts --- Completion/Core/_multi_parts 2001/03/28 10:58:02 1.6 +++ Completion/Core/_multi_parts 2001/03/29 08:31:28 @@ -91,10 +91,10 @@ else # No exact match, see how many strings match what's on the line. - builtin compadd -O tmp1 - "${(@)matches%%${sep}*}" + builtin compadd -O tmp1 - "${(@)${(@)matches%%${sep}*}:#}" [[ $#tmp1 -eq 0 && -n "$_comp_correct" ]] && - compadd -O tmp1 - "${(@)matches%%${sep}*}" + compadd -O tmp1 - "${(@)${(@)matches%%${sep}*}:#}" if [[ $#tmp1 -eq 1 ]]; then -- Sven Wischnowsky wischnow@informatik.hu-berlin.de