From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12936 invoked from network); 20 Jul 1999 11:05:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Jul 1999 11:05:39 -0000 Received: (qmail 3186 invoked by alias); 20 Jul 1999 11:05:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7220 Received: (qmail 3179 invoked from network); 20 Jul 1999 11:05:32 -0000 Date: Tue, 20 Jul 1999 13:05:28 +0200 (MET DST) Message-Id: <199907201105.NAA01977@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: =?iso-8859-1?Q?Thomas_K=F6hler?='s message of Mon, 19 Jul 1999 19:00:28 +0200 Subject: PATCH: Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2) Thomas Koehler wrote: > 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) ~> ls a > -> works, shows all 3 matches in cyan as desired > > jean-luc@picard (ttyp5) ~> ls a > -> doesn't work, shows all 3 matches uncoloured > > Any hints what goes wrong? Did I miss an option or is this really a bug? This patch makes `*=...' be used (it was explicitly ignored, I don't remember why did it -- maybe GNU-ls does it?). And it also resets `last_col' before printing the list -- maybe I'm getting blind, but maybe this was really missing. Together (or either of them) may solve the problem -- could you please try it? Bye Sven 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; if (*p) *p++ = '\0'; return p; @@ -460,6 +458,7 @@ } } /* Now print the matches. */ + last_col = COL_NO - 1; g = amatches; while (g) { char **pp = g->ylist; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de