romkatv / zsh4humans

A turnkey configuration for Zsh
MIT License
1.81k stars 116 forks source link

[Question] how do I change the color of the initial/non-suggested part of a suggestion? #331

Closed cgahr closed 1 week ago

cgahr commented 1 week ago

Thanks a lot for this cool project. On the third/fourth try I finally managed to stick with it, and now I'm using it everywhere!

How do I change the color of the purple area? image how: type ls + up-arrow

How do I change the color of the read area (less important)? image how: type ls + up-arrow + down-arrow

I know that I can use e.g.

export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=15"

to style the suggestion part of the prompt, i.e. everything but the purple/red part. But I'm unclear on how to style this part.

Thanks a lot! I hope this is not a duplicate, but I wasn't able to find any information.

romkatv commented 1 week ago

Try this:

HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'

These are the default values. Adjust to your liking.

cgahr commented 1 week ago

Works like a charm, thanks a lot!