From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: newsgroup completion
Date: Fri, 9 Feb 2001 15:00:14 +0100 (MET) [thread overview]
Message-ID: <200102091400.PAA05871@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Thu, 8 Feb 2001 17:41:55 +0000
Oliver Kiddle wrote:
> ...
>
> I look in .newsrc* for newsgroups as this covers netscape and setups
> like mine where I have configured tin's newsrctable for multiple news
> servers. Having a glob also simplified the situation where .newsrc*
> doesn't exit because zsh doesn't run the fgrep. I suppose we could
> also add a style to specify a different newsrc file.
Hmhm. Re-use `path'.
> When no .newsrc file exists, I end up with _cache_newsgroups
> containing one empty value (''). I got around this by using the
> ${(w)#_cache_newsgroups} but it'd be nice if there was a parameter
> expansion flag or maybe a typeset option to remove empty entries from
> an array. Any opinions?
I always use ${array:#}.
> This newsgroup completion shows up a few problems with _multi_parts.
> The suffix handling doesn't seem to work properly. If I use
> _newsgroups -S',' I still get a space and not a comma after a full
> newsgroup name.
Handling of -S is non-trivial in _multiparts because there are so many
placees where it has to use it itself. I've found one more place where
the caller-supplied -S could be used, I think.
> I'm also getting a problem after the first part of a newsgroup is
> typed in full. e.g:
> tin comp<tab>
> gives me:
> tin comp..comp.
> I can reproduce this starting from zsh -f so it isn't my setup.
And I think I fixed this, too.
Bye
Sven
Index: Completion/Core/_multi_parts
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_multi_parts,v
retrieving revision 1.4
diff -u -r1.4 _multi_parts
--- Completion/Core/_multi_parts 2000/07/24 12:52:42 1.4
+++ Completion/Core/_multi_parts 2001/02/09 13:55:48
@@ -113,7 +113,7 @@
if [[ $#imm -ne 0 && $#matches -eq 1 ]] ||
zstyle -t ":completion:${curcontext}:" expand suffix; then
- compadd "$group[@]" "$expl[@]" "$opts[@]" \
+ compadd "$group[@]" "$expl[@]" "$sopts[@]" \
-M "r:|${sep}=* r:|=* $matcher" - "$pref$matches[1]"
else
if (( $matches[(I)${tmp1[1]}${sep}*] )); then
@@ -235,7 +235,7 @@
SUFFIX=""
if [[ -n "$pref" && "$orig" != "$pref" ]]; then
- if [[ "$pref" = *${sep} ]]; then
+ if [[ "$pref" = *${sep}*${sep} ]]; then
compadd "$group[@]" "$expl[@]" "$opts[@]" \
-p "${pref%${sep}*${sep}}${sep}" -S "$sep" \
-M "r:|${sep}=* r:|=* $matcher" - "${${pref%${sep}}##*${sep}}"
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2001-02-09 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-09 14:00 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-02-08 17:41 Oliver Kiddle
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=200102091400.PAA05871@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).