Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Funky list-colors



On Wed, Dec 04, 2019 at 03:27:17PM -0800, Bart Schaefer wrote:
> OK, so what you want here is not to fiddle with the way completion
> applies colors to the grid, but the way it populates the grid with
> file names.
> 
> The first and most straightforward thing you might do is set the
> LIST_TYPES option [...]
>
> If that's not sufficient [...] you should look at the file-patterns
> zstyle...

Thanks, I know about and using both.

> If that's still not enough, then you'll want to create your own
> completion function to manage these files.  "compadd -P prefix ..."
> will attach a prefix to each string added by that call to compadd,
> where that prefix is NOT treated as part of the file name...

I tried it but my input was immediately completed by this prefix.

"ls <Tab>" -> "ls prefix".

If it's the intended behavior, I'm surely not look for this.

> For even more detail you can use something similar to:
>   compadd -o -d labels_array -a filenames_array

It looks wonderful! I think it will work for me. Can I make parts of
labels bold or colored? (Zsh seems to escape escape codes.) Or it's only
doable with "list-colors"?

-- 
zsugabubus



Messages sorted by: Reverse Date, Date, Thread, Author