zsh-workers
 help / color / mirror / code / Atom feed
* Module zsh/complist and coloring
@ 2008-08-27 14:02 Julius Plenz
  2008-08-30 11:43 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Julius Plenz @ 2008-08-27 14:02 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-30 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-27 14:02 Module zsh/complist and coloring Julius Plenz
2008-08-30 11:43 ` Peter Stephenson
2008-08-30 14:16   ` Julius Plenz

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).