zsh-workers
 help / color / mirror / code / Atom feed
* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
@ 1999-07-20  8:08 Sven Wischnowsky
  1999-07-20 14:49 ` Thomas Köhler
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 1999-07-20  8:08 UTC (permalink / raw)
  To: zsh-workers


Thomas Koehler wrote:

> jean-luc@picard (ttyp5) ~> ls <TAB>
> zsh: do you wish to see all 154 possibilities? 
> -> works, shows all in the desired colours
> 
> jean-luc@picard (ttyp5) ~> ls <TAB>
> zsh: do you wish to see all 154 possibilities? y
> jean-luc@picard (ttyp5) ~> ls a<TAB>
> -> works, shows all 3 matches in cyan as desired
> 
> jean-luc@picard (ttyp5) ~> ls a<TAB>
> -> doesn't work, shows all 3 matches uncoloured
> 
> Any hints what goes wrong? Did I miss an option or is this really a bug?

Hm, I can't reproduce this. For me this always correctly colours the
list. Could you try to reproduce it with a very simple setup (e.g. in
a directory with only a couple of files which I could then create
here)?


Bye
 Sven


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


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

* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
  1999-07-20  8:08 Problem with ZLS_COLOURS (zsh-3.1.6-test-2) Sven Wischnowsky
@ 1999-07-20 14:49 ` Thomas Köhler
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Köhler @ 1999-07-20 14:49 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote:
> 
> Thomas Koehler wrote:
> 
> > jean-luc@picard (ttyp5) ~> ls <TAB>
> > zsh: do you wish to see all 154 possibilities? 
> > -> works, shows all in the desired colours
> > 
> > jean-luc@picard (ttyp5) ~> ls <TAB>
> > zsh: do you wish to see all 154 possibilities? y
> > jean-luc@picard (ttyp5) ~> ls a<TAB>
> > -> works, shows all 3 matches in cyan as desired
> > 
> > jean-luc@picard (ttyp5) ~> ls a<TAB>
> > -> doesn't work, shows all 3 matches uncoloured
> > 
> > Any hints what goes wrong? Did I miss an option or is this really a bug?
> 
> Hm, I can't reproduce this. For me this always correctly colours the
> list. Could you try to reproduce it with a very simple setup (e.g. in
> a directory with only a couple of files which I could then create
> here)?

jean-luc@picard (ttyp9) ~/zsh> ls <TAB>
URLs        _make       foo/        zsh_a4.ps             
jean-luc@picard (ttyp9) ~/zsh> ls

-> URLs and _make are uncoloured, foo/ is green as expected, zsh_a4.ps
is cyan as expected.

Ah. I think the problem is the first few matches that fit in the "normal
file" highlightning. After the first directory name, everything is OK,
before, it isn't.

Tried with this .zshrc:

--------------
setopt autolist
ZLS_COLOURS="no=36;40:fi=36;40:di=32;40:ln=36;40:pi=31;40:so=22;40:bd=44;37:cd=44;37:ex=35;40:mi=36;40:lc=\e[:rc=m:ec=:ma=37;41:*=36;40"
export ZLS_COLOURS
--------------

> Bye
>  Sven

CU,
Thomas

-- 
    Thomas Köhler    Email:     jean-luc@picard.franken.de
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships


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

* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
  1999-07-21 12:15 Sven Wischnowsky
  1999-07-21 12:00 ` Peter Stephenson
@ 1999-07-21 15:33 ` Thomas Köhler
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Köhler @ 1999-07-21 15:33 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote:
> 
> Thomas Koehler wrote:
> 
> > This part of the patch causes *ALL* matches to be highlighted in cyan,
> > even directories. If I don't apply this part but the part down there,
> > all works as expected.
> 
> That's because of your ZLS_COLOURS='...:*=36;40', of course, such
> `empty' patterns were silently ignored before the patch.

*uhm* So applying the patch and taking out the "*=36;40" would do the
trick?
It works now with that "*=36;40" and without that part...

> When I first posted collist I asked if someone who uses GNU-ls with
> colours could check if collist does the same as that; this is one of
> the places where I wasn't sure. Since I don't have a GNU-ls here, I
> have to ask: in complist patterns take precedence over file-type-
> capabilities -- is this different in the GNU-ls?

I don't read all messages on the workers list (there's a lack of time on
my side), so I have missed that completely. reading the 3.1.6-test-1
announce was my reason to get a newer version than the 3.1.4 I was
using... And I read about that cool feature and wanted to check it out
:-)
Now... I just tested ls with LS_COLORS set to my ZLS_COLOURS (and there
was a bug in there, ma where mi should have been) - now zsh and ls do
the same colouring *cool*.
Anyways, there's a bug in GNU ls :) It ignores LS_COLOURS completely and
only honors LS_COLORS - while the manpage says both work. zsh is much
better here :)
BTW: The "*=36;40" makes no difference for ls and its colouring...

> Bye
>  Sven

CU,
Thomas

-- 
    Thomas Köhler    Email:     jean-luc@picard.franken.de
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships


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

* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
  1999-07-21 10:01 Sven Wischnowsky
@ 1999-07-21 13:13 ` Thomas Köhler
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Köhler @ 1999-07-21 13:13 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote:
> 
> Thomas Koehler wrote:
> 
> > Ah. I think the problem is the first few matches that fit in the "normal
> > file" highlightning. After the first directory name, everything is OK,
> > before, it isn't.
> 
> This is the kind of bug I would expect without the second part of
> 7220. Have you tried it?

Uhm, I missed it (hit the delete key too soon in my mailbox?). Here goes
my comment:

Your patch:
| diff -u os/Zle/complist.c Src/Zle/complist.c
| --- os/Zle/complist.c   Tue Jul 20 08:54:18 1999
| +++ Src/Zle/complist.c  Tue Jul 20 13:01:05 1999
| @@ -159,17 +159,15 @@
|         n = ++s;
|         while (*s && *s != '=')
|             s++;
| -       if (!*s )
| +       if (!*s)
|             return s;
|         *s++ = '\0';
|         p = getcolval(s);
| -       if (*n) {
| -           ec = (Extcol) zhalloc(sizeof(*ec));
| -           ec->ext = n;
| -           ec->col = s;
| -           ec->next = c->exts;
| -           c->exts = ec;
| -       }
| +       ec = (Extcol) zhalloc(sizeof(*ec));
| +       ec->ext = n;
| +       ec->col = s;
| +       ec->next = c->exts;
| +       c->exts = ec;

This part of the patch causes *ALL* matches to be highlighted in cyan,
even directories. If I don't apply this part but the part down there,
all works as expected.

|         if (*p)
|             *p++ = '\0';
|         return p;
| @@ -460,6 +458,7 @@
|         }
|      }
|      /* Now print the matches. */
| +    last_col = COL_NO - 1;

This is the part that makes everything work.

|      g = amatches;
|      while (g) {
|         char **pp = g->ylist;

So, the whole problem is solved by a oneliner. The line
   last_col = COL_NO - 1;
was missing.

> Bye
>  Sven

Thanks,
Thomas [happy now]

-- 
    Thomas Köhler    Email:     jean-luc@picard.franken.de
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships


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

* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
@ 1999-07-21 12:15 Sven Wischnowsky
  1999-07-21 12:00 ` Peter Stephenson
  1999-07-21 15:33 ` Thomas Köhler
  0 siblings, 2 replies; 8+ messages in thread
From: Sven Wischnowsky @ 1999-07-21 12:15 UTC (permalink / raw)
  To: zsh-workers


Thomas Koehler wrote:

> This part of the patch causes *ALL* matches to be highlighted in cyan,
> even directories. If I don't apply this part but the part down there,
> all works as expected.

That's because of your ZLS_COLOURS='...:*=36;40', of course, such
`empty' patterns were silently ignored before the patch.

When I first posted collist I asked if someone who uses GNU-ls with
colours could check if collist does the same as that; this is one of
the places where I wasn't sure. Since I don't have a GNU-ls here, I
have to ask: in complist patterns take precedence over file-type-
capabilities -- is this different in the GNU-ls?

Bye
 Sven


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


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

* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
  1999-07-21 12:15 Sven Wischnowsky
@ 1999-07-21 12:00 ` Peter Stephenson
  1999-07-21 15:33 ` Thomas Köhler
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Stephenson @ 1999-07-21 12:00 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky wrote:
> Since I don't have a GNU-ls here, I
> have to ask: in complist patterns take precedence over file-type-
> capabilities -- is this different in the GNU-ls?

Looks to me like it's the same.  I did
  LS_COLORS="*=4" gls --color=yes
and everything came out underlined.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
@ 1999-07-21 10:01 Sven Wischnowsky
  1999-07-21 13:13 ` Thomas Köhler
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 1999-07-21 10:01 UTC (permalink / raw)
  To: zsh-workers


Thomas Koehler wrote:

> Ah. I think the problem is the first few matches that fit in the "normal
> file" highlightning. After the first directory name, everything is OK,
> before, it isn't.

This is the kind of bug I would expect without the second part of
7220. Have you tried it?

Bye
 Sven


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


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

* Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
@ 1999-07-19 17:00 Thomas Köhler
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Köhler @ 1999-07-19 17:00 UTC (permalink / raw)
  To: Zsh workers list

Hi,
I have a slight problem with ZLS_COLOURS - the colours aren't being used
in all cases :-(
I use this:
ZLS_COLOURS="no=36;40:fi=36;40:di=32;40:ln=36;40:pi=31;40:so=22;40:bd=44;37:cd=44;37:ex=35;40:mi=36;40:lc=\e[:rc=m:ec=:ma=37;41:*=36;40"

jean-luc@picard (ttyp5) ~> setopt
noalwayslastprompt
completeinword
extendedglob
interactive
monitor
rmstarsilent
shinstdin
zle
jean-luc@picard (ttyp5) ~> echo $ZSH_VERSION
3.1.6-test-2

jean-luc@picard (ttyp5) ~> ls <TAB>
zsh: do you wish to see all 154 possibilities? 
-> works, shows all in the desired colours

jean-luc@picard (ttyp5) ~> ls <TAB>
zsh: do you wish to see all 154 possibilities? y
jean-luc@picard (ttyp5) ~> ls a<TAB>
-> works, shows all 3 matches in cyan as desired

jean-luc@picard (ttyp5) ~> ls a<TAB>
-> doesn't work, shows all 3 matches uncoloured

Any hints what goes wrong? Did I miss an option or is this really a bug?

CU,
Thomas

-- 
    Thomas Köhler    Email:     jean-luc@picard.franken.de
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships


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

end of thread, other threads:[~1999-07-21 14:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-20  8:08 Problem with ZLS_COLOURS (zsh-3.1.6-test-2) Sven Wischnowsky
1999-07-20 14:49 ` Thomas Köhler
  -- strict thread matches above, loose matches on Subject: below --
1999-07-21 12:15 Sven Wischnowsky
1999-07-21 12:00 ` Peter Stephenson
1999-07-21 15:33 ` Thomas Köhler
1999-07-21 10:01 Sven Wischnowsky
1999-07-21 13:13 ` Thomas Köhler
1999-07-19 17:00 Thomas Köhler

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