How can I change the color of my prompt in zsh (different from normal text)?
问题 To recognize better the start and the end of output on a commandline, I want to change the color of my prompt, so that it is visibly different from the programs output. As I use zsh, can anyone give me a hint? 回答1: Here's an example of how to set a red prompt: PS1=$'\e[0;31m$ \e[0m' The magic is the \e[0;31m (turn on red foreground) and \e[0m (turn off character attributes). These are called escape sequences. Different escape sequences give you different results, from absolute cursor