How can I set my prompt to be colourized in 256 colours? I am looking for an equivalent to the bash prompt:
local DEFAULT="\[\033[0;39m\]"
local ROOK="\[\033[38;5;24m\]"
PS1="${ROOK}\$${DEFAULT} "
|
First, ensure that your terminal supports 256 colors, which I suppose you already have. Second, use a
This will give you a prompt with the host name in bold, with a foreground color of 214 and a background color of 123. Note that the |
|||||||
|
export PS1='%{[38;5;24m%};%{[0m%} 'is exactly what I wanted. – Sardathrion Nov 25 '11 at 12:32