From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29634 invoked from network); 22 Feb 2000 09:11:06 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2000 09:11:06 -0000 Received: (qmail 9368 invoked by alias); 22 Feb 2000 09:11:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9831 Received: (qmail 9361 invoked from network); 22 Feb 2000 09:11:00 -0000 Date: Tue, 22 Feb 2000 10:10:59 +0100 (MET) Message-Id: <200002220910.KAA14295@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Mon, 21 Feb 2000 17:25:15 +0000 Subject: Re: PATCH: Re: PATCH: Improved _mailboxes Bart Schaefer wrote: > ... > > There's one oddment left: When completing the full paths added by > _multi_parts under menu completion, one gets things like > > zsh% mutt -f / > /home /usr /var > zsh% mutt -f / > zsh% mutt -f /home/ > > Now hitting TAB just cycles /home /usr /var. But if I type a / to continue > completing within /home, I get > > zsh% mutt -f /home// > > I tried adding -S/ -q to the _multi_parts call but the slash still does not > become autoremovable. It does vanish when I next type TAB: > > zsh% mutt -f /home// > zsh% mutt -f /home/schaefer/ > > This is with Sven's latest _multi_parts patch (9816). I was worried about that, too. This makes the separator character be removed if it is typed. Not that I used -r "$sep" so that typing a space or any other of those characters that normally auto-remove such a suffix will in this case *not* remove it. Since _multi_parts has to consider the strings it gets to be exact matches, this is correct. If anyone doesn't like it, tell me or just replace those `-r "$sep"''s with a -q, I'm not religiously attached to them. Bye Sven diff -ru ../z.old/Completion/Core/_multi_parts Completion/Core/_multi_parts --- ../z.old/Completion/Core/_multi_parts Tue Feb 22 09:10:49 2000 +++ Completion/Core/_multi_parts Tue Feb 22 10:06:31 2000 @@ -121,7 +121,7 @@ tmp2=( "${(@M)matches:#${tmp1[1]}${sep}*}" ) if (( $#tmp2 )); then - compadd "$group[@]" "$expl[@]" -p "$pref" -qS "$sep" "$opts[@]" \ + compadd "$group[@]" "$expl[@]" -p "$pref" -r "$sep" -S "$sep" "$opts[@]" \ -M "r:|${sep}=* r:|=* $match" - "$tmp1[1]" else compadd "$group[@]" "$expl[@]" -p "$pref" "$sopts[@]" \ @@ -162,9 +162,9 @@ fi for i in "${(@M)matches:#(${(j:|:)~tmp1})*}"; do if [[ "$i" = *${sep}* ]]; then - compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" \ + compadd "$group[@]" "$expl[@]" -r "$sep" -S "$sep" "$opts[@]" \ -p "$pref" \ - -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}${sep}" + -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}" else compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" -p "$pref" \ -M "r:|${sep}=* r:|=* $match" - "$i" @@ -177,9 +177,9 @@ for i in "${(@M)matches:#(${(j:|:)~tmp1})*}"; do if [[ "$i" = *${sep}* ]]; then - compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" \ + compadd "$group[@]" "$expl[@]" -r "$sep" -S "$sep" "$opts[@]" \ -p "$pref" -s "${i#*${sep}}" \ - -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}${sep}" + -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}" else compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" -p "$pref" \ -M "r:|${sep}=* r:|=* $match" - "$i" -- Sven Wischnowsky wischnow@informatik.hu-berlin.de