From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26976 invoked from network); 27 Aug 2008 14:03:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Aug 2008 14:03:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 23376 invoked from network); 27 Aug 2008 14:02:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Aug 2008 14:02:40 -0000 Received: (qmail 9227 invoked by alias); 27 Aug 2008 14:02:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25536 Received: (qmail 9208 invoked from network); 27 Aug 2008 14:02:25 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 27 Aug 2008 14:02:25 -0000 Received: from eris.feh.name (eris.feh.name [88.198.13.233]) by bifrost.dotsrc.org (Postfix) with ESMTP id 95C9B8058F4D for ; Wed, 27 Aug 2008 16:02:21 +0200 (CEST) Received: by eris.feh.name (Postfix, from userid 1000) id 47D9AF6012A; Wed, 27 Aug 2008 16:02:21 +0200 (CEST) Date: Wed, 27 Aug 2008 16:02:21 +0200 From: Julius Plenz To: zsh-workers@sunsite.dk Subject: Module zsh/complist and coloring Message-ID: <20080827140221.GZ3846@plenz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Key: 0x186DCA0D X-URL: http://www.plenz.com/ X-Editor: Vim 7.0 - set ai et ts=4 tw=70 comments=b:#,:%,fb:-,n:>,n:) nosm nonu User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV 0.92.1/8099/Wed Aug 27 15:14:40 2008 on bifrost X-Virus-Status: Clean Hi folks! What has bugged me quite a while now is the following: completions that add file names but don't use _path_files to add them (but simply compadd) don't get coloring of the matches. I traced this down to the -f option of compadd that marks the matches as being filenames. This doesn't seem to help much, though. For example in _remote_files, if I add the -f argument to the compadd call, *some* files and directories are colored -- those that exist on the remote *and* the local system. So compadd seems to look up the file type of each match. Strangely enough, patterns like *.jpeg=1;32 in LS_COLORS (whose value is also used for the list-colors style, which also correctly sets ZLS_COLORS during completion) should work nevertheless, shouldn't they? My guess is, that, if compadd doesn't find the file, these patterns aren't tried at all. Of course this behaviour is intended, so that non-files (i.e., long option names or simpe values) are not misleadingly colored. But especially for _remote_files, from the trailing slash you can tell directories from files apart. Since you cannot download non-files, it'd make sense to have a possibility to tell compadd or the complist module that the matches are all valid filenames, no need for checking that. What do you think? Julius