From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-users@sunsite.auc.dk
Subject: Re: wish for a colored completion system
Date: Fri, 9 Jun 2000 09:24:13 +0200 (MET DST) [thread overview]
Message-ID: <200006090724.JAA13449@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Thu, 8 Jun 2000 13:07:57 -0700
Bart Schaefer wrote:
> On Jun 8, 3:39pm, Fletch wrote:
> >
> > If I add '=lemur*=01;32' to ':completion:*' list-colors it
> > works fine (ssh l<C-d> produces three highighted lemur* and plain
> > localhost and lp).
>
> Aha! You have host names and user names listed simultaneously.
>
> Add this:
>
> zstyle ':completion:*' group-name ''
>
> That will make two sub-lists, one of host names and one of user names,
> and then you'll get the colors in the host names.
>
> I'm not sure why ':completion:*:ssh:*' doesn't work for the combined
> listing; perhaps it's a bug. Sven?
Hm, yes, the description in the docs make it sound as if it should
work. The problem is that without separate groups there is no way for
the completion code to find out that with
zstyle ':completion:*:ssh:*:hosts' list-colors '=a*=31'
zstyle ':completion:*:ssh:*:users' list-colors '=b*=32'
hosts starting with `b' should be coloured with `32'. We would need a
per-match colouring for that and that's too expensive.
And to come back to the question, the completion code only looks up
the style with the tag in the context and it can't find out that the
pattern used in the definition doesn't contain the tag. If we wanted
to solve that, we would have to make _setup get the name of the group
(which may be -default-) as an argument (when called from
_description) and use that name in ZLS_COLORS. But then we would be
back to what I said above.
So, we could (quite easily) change it, but that set-for-one-tag-and-
used-for-others-too made me do it in the way we have it now, I would
be willing to write the change if people say that they prefer it,
though (I have group-name == '', so I don't care much about this).
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-06-09 7:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-09 7:24 Sven Wischnowsky [this message]
[not found] <no.id>
2000-06-08 14:31 ` Matthias Kopfermann
2000-06-08 14:49 ` Sven Wischnowsky
2000-06-08 14:50 ` Thomas Köhler
2000-06-08 15:11 ` Matthias Kopfermann
2000-06-08 15:32 ` have to get used to the new zstyle thingy! Matthias Kopfermann
[not found] ` <0FVU005MNF7Q6N@la-la.cambridgesiliconradio.com>
2000-06-08 17:37 ` wish for a colored completion system Bart Schaefer
2000-06-08 18:44 ` Fletch
[not found] ` <000608122524.ZM16857@candle.brasslantern.com>
[not found] ` <m2bt1c0xoe.fsf@godzilla.phydeaux.org>
2000-06-08 20:07 ` Bart Schaefer
2000-06-08 20:18 ` Fletch
2000-06-08 20:36 ` Peter Stephenson
2000-06-09 13:36 ` Matthias Kopfermann
-- strict thread matches above, loose matches on Subject: below --
2000-06-08 10:41 Sven Wischnowsky
2000-06-07 15:20 Matthias Kopfermann
2000-06-07 16:09 ` 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=200006090724.JAA13449@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-users@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).