The zsh prompt is not bold

oh-my-zshpromptzshzshrc

I am customizing my zsh terminal but I face difficulties when it comes to turn my prompt into bold. I tried several different things, but none worked, whereas it did work for people on the Internet…

So this is my test prompt. Both "HEY" are in color 1, but the second "HEY" is supposed to be bold. It is obviously not, and instead of that, I get some flashy red, like the first part of my prompt, which is in color 9. wtf 🙂

Here is the code that I use in this case:

HEY%BHEY%b

I also noticed that it does the same thing for every one of the 8 first colors: black becomes grey, grey becomes white, night blue becomes dark blue, leaf green becomes flashy green, same for pink, yellow…

I also tried to use some escape sequences with the modulo, but none worked: each time, the modulo took the character next to it as its parameter and the rest of the code would just be displayed like normal characters.
For example, this:

PS1="%{\e[1;33%}test"

would display this:

\e[1;33test

Could someone explain me what is going wrong here and how I could fix it to have some (real) bold prompt text?

Best Answer

this is late but might help someone, the way OP did it is correct, I believe the issue he's having is related to his font rendering settings.

here's a list of all the prompt variables used in zsh and tcsh

http://www.nparikh.org/unix/prompt.php

as it's stated there %B (%b) = Start (stop) boldface mode.

Related Topic