From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15098 invoked from network); 28 Jun 2000 13:58:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jun 2000 13:58:40 -0000 Received: (qmail 13182 invoked by alias); 28 Jun 2000 13:58:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12107 Received: (qmail 13166 invoked from network); 28 Jun 2000 13:58:03 -0000 Date: Wed, 28 Jun 2000 15:57:51 +0200 (MET DST) Message-Id: <200006281357.PAA32437@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Matthias Kopfermann's message of Wed, 28 Jun 2000 15:22:25 +0200 Subject: PATCH: Re: coloring of --help completion possible? [ moved to workers, not CC'ed ] Matthias Kopfermann wrote: > Ah, and another question: > As I am a big color-completion-fan (yes, this is emotional, not only > functional :) ) I would like to have my > `--' completion do act in a colorful way. > But I am not sure how I can do that. > As i understand it It does involve zstyle ':completion:*' > something? This made me notice some misformatting in the ZLS_COLORS generated and the C-code should probably skip `empty' `capabilities' (as in `a=x::b=y'). Bye Sven Index: Completion/Core/_setup =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_setup,v retrieving revision 1.6 diff -u -r1.6 _setup --- Completion/Core/_setup 2000/06/22 08:42:36 1.6 +++ Completion/Core/_setup 2000/06/28 13:57:26 @@ -10,7 +10,7 @@ _comp_colors=( "$val[@]" ) else _comp_colors=( "$_comp_colors[@]" - "(${2})${(@)^val:#\(*\)*}" "${(M@)val:#\(*\)*}" ) + "(${2})${(@)^val:#(|\(*\)*)}" "${(M@)val:#\(*\)*}" ) fi # Here is the problem mentioned in _main_complete. Index: Src/Zle/complist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v retrieving revision 1.30 diff -u -r1.30 complist.c --- Src/Zle/complist.c 2000/06/28 07:29:59 1.30 +++ Src/Zle/complist.c 2000/06/28 13:57:27 @@ -362,7 +362,10 @@ memset(c, 0, sizeof(*c)); s = dupstring(s); while (*s) - s = getcoldef(c, s); + if (*s == ':') + s++; + else + s = getcoldef(c, s); /* Use default values for those that aren't set explicitly. */ for (i = 0; i < NUM_COLS; i++) { -- Sven Wischnowsky wischnow@informatik.hu-berlin.de