I’m using prezto with zsh, and my difficulty is with the syntax highlighting, of which a sample line is
I could also have here, for example
However, I want to take advantage of my 256 color terminal (konsole in my case), in which case I would have thought that something like
for example, would work, given that I have previously loaded the spectrum module.
But I can’t get this to work. I’ve checked that
tput colors returns 256, and that the command
echo "$FGHello, World"
gives me an orange output.
Anyway, whether I use spectrum or not, I’d like more control over my syntax highlighting, and to be able to use 256 colors. Any advice would be very welcome!
You could specify the color index here like below:
zsh-syntax-highlighting gets the ability to specify colors from the zsh’s Character Highlighting rather than ANSI escape sequences directly. This zsh manual describes a ‘fg=colour‘ as below:
The foreground colour should be set to colour, a decimal integer or the name of one of the eight most widely-supported colours.
We can use the color index rather than ANSI escpape sequences which spectrum module stores on
Answered By – hchbaw
Answer Checked By – Mildred Charles (AngularFixing Admin)