From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: PATCH: Improved _mailboxes
Date: Tue, 22 Feb 2000 10:10:59 +0100 (MET) [thread overview]
Message-ID: <200002220910.KAA14295@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Mon, 21 Feb 2000 17:25:15 +0000
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 /<TAB>
> /home /usr /var
> zsh% mutt -f /<TAB>
> 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//<TAB>
> 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
next reply other threads:[~2000-02-22 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-22 9:10 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-21 12:30 Sven Wischnowsky
2000-02-21 16:41 ` Bart Schaefer
2000-02-21 17:25 ` PATCH: " Bart Schaefer
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=200002220910.KAA14295@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.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).