zsh-users
 help / color / mirror / code / Atom feed
* Glob qualifiers not working in coloured completion listings
@ 2009-02-09 16:30 David Evans
  2009-02-09 16:50 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: David Evans @ 2009-02-09 16:30 UTC (permalink / raw)
  To: zsh-users

  Hi there.

  Look at this:

reddwarf:~/foo> zsh --version
zsh 4.3.4 (powerpc-apple-darwin9.0)
reddwarf:~/foo> ls
./  ../ d1/ d2
reddwarf:~/foo> ls -d d*(/)
d1/
reddwarf:~/foo> zstyle ':completion:*' list-colors "=d*=$colour[green]"
reddwarf:~/foo> ls -d d<TAB>
d1/  d2

[ both are green ]

reddwarf:~/foo> zstyle ':completion:*' list-colors "=d*(/)=$colour[green]"
reddwarf:~/foo> ls -d d<TAB>
d1/  d2

[ d1 isn't green! ]

So d*(/) matches what's expected when expanded as part of the execution
of ls -d, but not when used in list-colors.  Any ideas?

  Thanks in advance!

-- 
David Evans                                     David.Evans@cl.cam.ac.uk
Research Associate                        http://www.cl.cam.ac.uk/~de239
Computer Laboratory, University of Cambridge


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

* Re: Glob qualifiers not working in coloured completion listings
  2009-02-09 16:30 Glob qualifiers not working in coloured completion listings David Evans
@ 2009-02-09 16:50 ` Bart Schaefer
  2009-02-09 16:55   ` David Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2009-02-09 16:50 UTC (permalink / raw)
  To: zsh-users

On Feb 9,  4:30pm, David Evans wrote:
}
} So d*(/) matches what's expected when expanded as part of the execution
} of ls -d, but not when used in list-colors.  Any ideas?

Patterns in list colorings are exactly that:  patterns.  They are not
file expansions.  The match is done strictly on the text in the list 
of completions, and has no reference to any actual files underneath;
the strings being colored might, in fact, never have been file names
in the first place.


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

* Re: Glob qualifiers not working in coloured completion listings
  2009-02-09 16:50 ` Bart Schaefer
@ 2009-02-09 16:55   ` David Evans
  0 siblings, 0 replies; 3+ messages in thread
From: David Evans @ 2009-02-09 16:55 UTC (permalink / raw)
  To: zsh-users

On Mon, Feb 09, 2009 at 08:50:36AM -0800, Bart Schaefer wrote:
> On Feb 9,  4:30pm, David Evans wrote:
> }
> } So d*(/) matches what's expected when expanded as part of the execution
> } of ls -d, but not when used in list-colors.  Any ideas?
> 
> Patterns in list colorings are exactly that:  patterns.  They are not
> file expansions.  The match is done strictly on the text in the list 
> of completions, and has no reference to any actual files underneath;
> the strings being colored might, in fact, never have been file names
> in the first place.

  Ahhh, OK, then that explains what's happening.  A shame but
understandable.  So it seems there's no way to, for example, colour
sgid executables.

  Thanks!

-- 
David Evans                                     David.Evans@cl.cam.ac.uk
Research Associate                        http://www.cl.cam.ac.uk/~de239
Computer Laboratory, University of Cambridge


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

end of thread, other threads:[~2009-02-09 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 16:30 Glob qualifiers not working in coloured completion listings David Evans
2009-02-09 16:50 ` Bart Schaefer
2009-02-09 16:55   ` David Evans

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