* Re: Odd behavior with ZLS_COLORS
@ 2001-03-15 9:46 Sven Wischnowsky
0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2001-03-15 9:46 UTC (permalink / raw)
To: zsh-users
John Cooper wrote:
> [ZSH_VERSION is 4.0.1-pre-2]
>
> I have `zmodload zsh/complist' in my .zshrc file, but after attempting
> completion, my ZLS_COLORS variable seems to get cleared:
>
> % ZLS_COLORS=$LS_COLORS
> % echo $ZLS_COLORS
> di=1;31:ex=1;32:*.dll=1;32:*.java=1;33:*.c=1;33:*.html=1;33:*.htm=1;33:*.el=1;35:*.zip=1;35:*.gz=1;35:*.tar=1;35:*.jar=1;35:*.cab=1;35
> % ls apacheTAB
> ApacheJServ-1.1.2/ apache_1.3.14/
> % echo $ZLS_COLORS
>
> %
>
> Oddly, the coloring of file names is identical to what I get with GNU `ls' with
> the sole exception that zsh completion gives me directories in blue, but ls
> shows them in red!
The obvious explanation is that somehow I got the builtin default
(hard-coded into complist.c -- ZLS_COLORS is set (i.e., in this case,
cleared) from the list-color style before the code that uses
$ZLS_COLORS) wrong. And I love separating single words from the rest
of the sentence by long and nested parentheses.
Bye
Sven
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.39
diff -u -r1.39 complist.c
--- Src/Zle/complist.c 2001/01/18 14:41:40 1.39
+++ Src/Zle/complist.c 2001/03/15 09:42:15
@@ -76,7 +76,7 @@
/* Default values. */
static char *defcols[] = {
- "0", "0", "1;34", "1;36", "33", "1;35", "1;33", "1;33", "1;32", NULL,
+ "0", "0", "1;31", "1;36", "33", "1;35", "1;33", "1;33", "1;32", NULL,
"\033[", "m", NULL, "0", "0", "7", "0", "0"
};
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Odd behavior with ZLS_COLORS
2001-03-14 15:53 John Cooper
@ 2001-03-14 15:58 ` Peter Stephenson
0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2001-03-14 15:58 UTC (permalink / raw)
To: Zsh users list, John Cooper
> I have `zmodload zsh/complist' in my .zshrc file, but after attempting
> completion, my ZLS_COLORS variable seems to get cleared:
That's actually documented, somewhere; it's certainly mentioned in the
guide (http://sunsite.dk/zsh/Guide/ chapter 6, section 6.5.2). Using the
list-colors style as you do later is the correct thing to do.
As for the colour scheme, only our Berlin department is equipped to respond
to such queries...
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 3+ messages in thread
* Odd behavior with ZLS_COLORS
@ 2001-03-14 15:53 John Cooper
2001-03-14 15:58 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: John Cooper @ 2001-03-14 15:53 UTC (permalink / raw)
To: zsh-users
[ZSH_VERSION is 4.0.1-pre-2]
I have `zmodload zsh/complist' in my .zshrc file, but after attempting
completion, my ZLS_COLORS variable seems to get cleared:
% ZLS_COLORS=$LS_COLORS
% echo $ZLS_COLORS
di=1;31:ex=1;32:*.dll=1;32:*.java=1;33:*.c=1;33:*.html=1;33:*.htm=1;33:*.el=1;35:*.zip=1;35:*.gz=1;35:*.tar=1;35:*.jar=1;35:*.cab=1;35
% ls apacheTAB
ApacheJServ-1.1.2/ apache_1.3.14/
% echo $ZLS_COLORS
%
Oddly, the coloring of file names is identical to what I get with GNU `ls' with
the sole exception that zsh completion gives me directories in blue, but ls
shows them in red!
I've discovered (from the docs) that the following zstyle incantation causes
the zsh completions to exactly match my ls completions (including red
directories), but I thought I'd mention the red/blue strangeness anyway, as I'm
curious if there's an obvious explanation.
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
--- John
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-03-15 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-15 9:46 Odd behavior with ZLS_COLORS Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
2001-03-14 15:53 John Cooper
2001-03-14 15:58 ` Peter Stephenson
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).