From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: MH for Mailboxes (TM)
Date: Wed, 28 Mar 2001 12:55:48 +0200 (MET DST) [thread overview]
Message-ID: <200103281055.MAA14996@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Wed, 28 Mar 2001 06:30:36 +0000
Bart Schaefer wrote:
> On Mar 26, 10:34am, Sven Wischnowsky wrote:
> }
> } Bart Schaefer wrote:
> }
> } > By the way (Sven), when I complete after "mutt -f " (with no prefix in
> } > the current word) I -still- get a blank item as the first menu-selection.
> } > I thought we fixed that bug a long time ago?
> }
> } Yes, sounds very familiar. I don't remember exactly and since I don't
> } use anything I could complete with _mailboxes I can't easily try, but
> } normally that's because one of the expansions leaves an empty element
> } in an array.
>
> I've looked through _complete_debug output and not managed to find any
> cases where `compadd' is called with an array containing an empty element.
>
> 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?
Bye
Sven
Index: Completion/Core/_multi_parts
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_multi_parts,v
retrieving revision 1.5
diff -u -r1.5 _multi_parts
--- Completion/Core/_multi_parts 2001/02/09 14:01:58 1.5
+++ Completion/Core/_multi_parts 2001/03/28 10:53:10
@@ -163,14 +163,14 @@
compadd "$group[@]" "$expl[@]" -r "$sep" -S "$sep" "$opts[@]" \
-p "$pref" "$tmp2[@]" -M "r:|${sep}=* r:|=* $matcher" - \
- "${(@)${(@M)matches:#*${sep}}%%${sep}*}" && ret=0
+ "${(@)${(@)${(@M)matches:#*${sep}}%%${sep}*}:#}" && ret=0
(( $matches[(I)${sep}*] )) &&
compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" \
-p "$pref" \
-M "r:|${sep}=* r:|=* $matcher" - "$sep" && ret=0
compadd "$group[@]" "$expl[@]" -r "$sep" -S "$sep" "$opts[@]" \
-p "$pref" "$tmp2[@]" -M "r:|${sep}=* r:|=* $matcher" - \
- "${(@)${(@M)matches:#*?${sep}?*}%%${sep}*}" && ret=0
+ "${(@)${(@)${(@M)matches:#*?${sep}?*}%%${sep}*}:#}" && ret=0
compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" -p "$pref" "$tmp2[@]" \
-M "r:|${sep}=* r:|=* $matcher" - \
"${(@)matches:#*${sep}*}" && ret=0
@@ -182,7 +182,7 @@
compadd "$group[@]" "$expl[@]" "$opts[@]" \
-p "$pref" -s "${i#*${sep}}" \
-M "r:|${sep}=* r:|=* $matcher" - \
- "${(@)${(@M)matches:#*${sep}*}%%${sep}*}" && ret=0
+ "${(@)${(@)${(@M)matches:#*${sep}*}%%${sep}*}:#}" && ret=0
compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" -p "$pref" \
-M "r:|${sep}=* r:|=* $matcher" - \
"${(@)matches:#*${sep}*}" && ret=0
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2001-03-28 10:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-28 10:55 Sven Wischnowsky [this message]
2001-03-28 15:53 ` Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
2001-03-29 8:36 Sven Wischnowsky
2001-03-29 8:52 ` Bart Schaefer
2001-03-26 8:34 Sven Wischnowsky
2001-03-28 6:30 ` Bart Schaefer
2001-03-23 17:22 Peter Stephenson
2001-03-24 18:06 ` Bart Schaefer
2001-03-24 23:55 ` Peter Stephenson
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=200103281055.MAA14996@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@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).