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

Re: PATCH: prompt theme system improvements



Oliver Kiddle wrote:

> ...
> 
> With respect to colour themes. It would be good to have a single way
> for defining colours across zsh. ZLS_COLOURS may be compatible with
> GNU ls but it isn't exactly the most readable way.

Ah. See? I suggested then when I first started participating in the
coloured-completion-lists discussion.

> One possible way would be to use an associative array for colours where the keys specify the context and the values specify the attributes. So for example, you might define:
> zsh_colours[ls_directories]="bold blue on white"
> zsh_colours[prompt_currentdir]="underlined green"

Ick. Maybe we should keep the parameter side more standard and just
use `bold:blue:white' or `bold:fg=blue:bg=white' or something. And
then add a function that uses a mini-language... err, wait, where have 
I heard that before.

I have almost given up dreaming about it, but: stuff like this always
reminds how nice it would be to generalise some of the completion-setup 
stuff to a more general package system. And then allow something like: 
`zstyle 'prompt:...:foreground' bold blue'.

> If different prompt themes use the same context words, you could share colour selections across prompts. It might also lead to a mechanism for defining the colours for different types of completion matches in the lists - not just for files.

...which complist currently can't do because it uses ZLS_* only for
files. But I have already asked: should we change it to allow using
pattern-capabilities for normal matches, too? The only problem I have
with that is that I would like to be able to give such specs per group 
of matches added. And that would require changes to compadd which
doesn't (and, in my opinion, shouldn't) know about complist. Hrm.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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