Change zsh history color

1.1k views Asked by At

I'm trying to change the colour of the autocomplete (from history) so that it doesn't match my input color (maybe same color less opacity..). Here's a pic:

enter image description here

Is this possible? (I'm using Terminator, if that helps at all..)

2

There are 2 answers

0
Marlon Richert On BEST ANSWER

First off, I presume you are talking about zsh-autosuggestions and not zsh-autocomplete (which is an awesome plugin, by the way; you should try it. :)

Secondly, out of the box, inline suggestions provided by zsh-autosuggestions are colored "bright black", which should usually work out as dark gray.

The behavior you're seeing is likely caused by your terminal incorrectly being reported to Zsh as not supporting more than 8 colors. Thus, Zsh rules that "bright black" is an invalid value for region_highlight (since it falls outside of 8 color range) and discards it.

Note, however, that the terminal does not directly report the number of colors it supports to Zsh. Rather, it sets the $TERM variable, which is then looked up in the terminfo database to determine the terminal's capabilities. It looks like Terminator needs some special handling for this: https://github.com/software-jessies-org/jessies/wiki/TerminatorFAQ#why-am-i-having-problems-with-terminfocurses

0
d6bels On

Anyone getting here wondering why suggestions are not light-colored should also check the following:

I you are using zsh-autosuggestions and zsh-syntax-highlighting make sure you have activated the lastest in last position. Otherwise, they make a mess and suggestions appear as default prompt.
Activation list:

plugins=( [plugins...] zsh-syntax-highlighting)