Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Coloring completions
On Thu, 15 Jul 2004, DervishD wrote:
> > When markdirs is set, the expansion of the glob appends a trailing
> > slash to the file name, and thus the coloring code no longer
> > recognizes it
>
> Why it doesn't happen with executable names (which has an asterisk
> added) or other kind of files? I mean, why 'listtypes' doesn't have the
> same effect?
I think it'll become obvious if you re-read the documentation for each of
those setopts:
-----
MARK_DIRS (-8, ksh: -X)
Append a trailing `/' to all directory names resulting from
filename generation (globbing).
LIST_TYPES (-X) <D>
When listing files that are possible completions, show the type of
each file with a trailing identifying mark.
-----
Specifically, when you write "compadd -f *" the effect of MARK_DIRS is
seen on the input (arguments) to compadd, but the effect of LIST_TYPES is
seen on the output (the completion listing). So the color matching can
already be done _before_ LIST_TYPES is applied, but it necessarily must be
done _after_ MARK_DIRS.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author