zsh-users
 help / color / mirror / code / Atom feed
* Re: wish for a colored completion system
@ 2000-06-08 10:41 Sven Wischnowsky
  0 siblings, 0 replies; 40+ messages in thread
From: Sven Wischnowsky @ 2000-06-08 10:41 UTC (permalink / raw)
  To: zsh-users


Bart Schaefer wrote:

> ...
> 
> So for example one can do
> 
> zstyle ':completion:*:zsh-options' \
> 	list-colors '=csh*=31:=*hist*=32:=list*=34:=*glob*=35'
> 
> ...
> 
> The tricky bit is figuring out what string goes at the tail of the style
> pattern, e.g. `zsh-options' in this case.  The place to look is the
> "Standard Tags" subsection in the "Completion System Configuration"
> chapter.

Or hit ^Xh (control-x h) and it will tell you (the `tags').


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 40+ messages in thread
[parent not found: <no.id>]
* Re: wish for a colored completion system
@ 2000-06-09  7:24 Sven Wischnowsky
  0 siblings, 0 replies; 40+ messages in thread
From: Sven Wischnowsky @ 2000-06-09  7:24 UTC (permalink / raw)
  To: zsh-users


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


^ permalink raw reply	[flat|nested] 40+ messages in thread
* wish for a colored completion system
@ 2000-06-07 15:20 Matthias Kopfermann
  2000-06-07 16:09 ` Bart Schaefer
  0 siblings, 1 reply; 40+ messages in thread
From: Matthias Kopfermann @ 2000-06-07 15:20 UTC (permalink / raw)
  To: zsh-users

Hi all,

generally i am quite exited about the zsh.
there is one feature that i really would like to have:
colored completion.
(I love colored completion when i hit ls<tab>.
 i want it with other completions , too , not only
 when i try to complete filenames .
thats why i would
love to have colored completion programmable.)
any thoughts about that?


otherwise i hope the near future can provide that :)
(whoever the future might be ... :) )


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2000-08-02 19:12 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-08 10:41 wish for a colored completion system Sven Wischnowsky
     [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
2000-06-14 13:43 ` Fun zsh trick for today Matthias Kopfermann
2000-06-14 13:57   ` Clint Adams
2000-06-14 14:09     ` Ollivier Robert
2000-06-14 15:02       ` Fletch
2000-06-14 14:15     ` Peter Stephenson
2000-06-14 14:21       ` Peter Stephenson
2000-06-14 14:27       ` Clint Adams
2000-06-14 14:37       ` Bart Schaefer
2000-06-14 15:33 ` Matthias Kopfermann
2000-06-14 15:52   ` Peter Stephenson
2000-06-14 16:31 ` Matthias Kopfermann
2000-06-26 10:23 ` (forw) --help able programs and completion Matthias Kopfermann
2000-06-26 10:30 ` Matthias Kopfermann
2000-06-29 11:41 ` is the reference card for zsh still 3.0 ? Matthias Kopfermann
2000-07-05 10:47 ` Matthias Kopfermann: Re: coloring of --help completion possible? Matthias Kopfermann
2000-07-17 13:39 ` wanted: viins-mode and digit argument with a,i,A and such Matthias Kopfermann
2000-07-17 14:06   ` Peter Stephenson
2000-07-21 10:42 ` completion for GNU color ls, anyone? Matthias Kopfermann
2000-07-21 15:17   ` Adam Spiers
2000-07-21 10:58 ` Matthias Kopfermann
2000-07-21 15:54   ` Bart Schaefer
2000-07-21 16:00 ` Matthias Kopfermann
2000-07-26 16:24 ` how can one let completion work *inside* zsh scripts? Matthias Kopfermann
2000-07-27 12:42 ` Matthias Kopfermann
2000-08-01 15:34 ` Matthias Kopfermann
  -- strict thread matches above, loose matches on Subject: below --
2000-06-09  7:24 wish for a colored completion system Sven Wischnowsky
2000-06-07 15:20 Matthias Kopfermann
2000-06-07 16:09 ` Bart Schaefer

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).