zsh-workers
 help / color / mirror / code / Atom feed
From: Julius Plenz <julius@plenz.com>
To: zsh-workers@sunsite.dk
Subject: Module zsh/complist and coloring
Date: Wed, 27 Aug 2008 16:02:21 +0200	[thread overview]
Message-ID: <20080827140221.GZ3846@plenz.com> (raw)

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


             reply	other threads:[~2008-08-27 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 14:02 Julius Plenz [this message]
2008-08-30 11:43 ` Peter Stephenson
2008-08-30 14:16   ` Julius Plenz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080827140221.GZ3846@plenz.com \
    --to=julius@plenz.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).