From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15086 invoked from network); 8 Jun 2000 14:49:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jun 2000 14:49:51 -0000 Received: (qmail 29688 invoked by alias); 8 Jun 2000 14:49:21 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3133 Received: (qmail 29680 invoked from network); 8 Jun 2000 14:49:20 -0000 Date: Thu, 8 Jun 2000 16:49:13 +0200 (MET DST) Message-Id: <200006081449.QAA21570@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: Matthias Kopfermann's message of Thu, 8 Jun 2000 16:31:30 +0200 Subject: Re: wish for a colored completion system Matthias Kopfermann wrote: > Okay, after having heard the answer that there is the possibility > to have colored completion, has anybody used it to create useful > completions with colors in them to share with us all? > There is not one example but the very easy to handle > ZLS_COLOURS case for completing different kinds of files. > To me it still seems to be quite complex to say the least. > > Okay, I try to be not so polite: :) > Should'nt there be an easier way than that approach? It's the normal way of configuring things for the new completion system and I definitely think colouring should be done like all other setup for it. The `=pat=col' syntax was partly chosen because we (well, some people here) wanted the possibility to use their $LS_COLOR for zsh, too. That left us not too many syntax extensions to use. Hm, how should we supply good examples for something depending so much on personal preference. One thing you can try is using similarities in the completion lists, like the ` -- ' thing used for descriptions: zstyle ':completion:*:(jobs|directory-stack|indexes|option|values)' list-colors \ '=(#b)(*) -- (*)=35;1=31=33' More examples? These show another problem: the patterns often depend on the output format of certain system commands like ps(1) and lpq(1): zstyle ':completion:*:processes' list-colors \ '=(#b)( #[0-9]#) ??????[^0-9]##([0-9]##:[0-9][0-9][.:][0-9][0-9])(*)=35=31;1=32=33' zstyle ':completion:*::lp*:jobs' list-colors \ '=(#b)* [0-9] ##([^ ]##) ##([^ ]##) ##([^ ]##) ##(*)=35=32=31;1=33=32' And we can't do anything about that... Other things one might want to highlight are the descriptions (see the `format' style) and probably `special' types of matches, like `warnings', `all-expansions', `original' etc. Oh, and, of course, the `ma' capability when using menu-selection. Bye Sven P.S.: You'll certainly get other colours because I don't use a colour-xterm. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de