Hello. Using the following snippet of Shell code script, I've been able to determine that my terminal on FreeBSD does support 256 colors.
The code is from this Stack Overflow article https://stackoverflow.com/questions/6159856/how-do-zsh-ansi-colour-codes-work
This gives me colors such as...
I'm using
I've read this old post https://forums.freebsd.org/threads/set-terminal-to-256-colors.8450/ but my terminal program doesn't appear to have the facility to
I've looked in the handbook but that only seems to consider the existence of 8 colors, unless I've missed something.
Can any suggest how to do this?
Code:
for COLOR in {0..255}
do
for STYLE in "38;5"
do
TAG="\033[${STYLE};${COLOR}m"
STR="${STYLE};${COLOR}"
echo -ne "${TAG}${STR}${NONE} "
done
echo
done
The code is from this Stack Overflow article https://stackoverflow.com/questions/6159856/how-do-zsh-ansi-colour-codes-work
This gives me colors such as...
I'm using
zsh
for my shell. My question is how do I use any color in the zsh
prompt. At the moment my prompt command is PROMPT='%F{magenta}%n%f@%F{cyan}%m%f %F{yellow}%1~%f %# '
I've read this old post https://forums.freebsd.org/threads/set-terminal-to-256-colors.8450/ but my terminal program doesn't appear to have the facility to
edit-->preferences-->advanced-->$TERM
settings, as that post would suggest. If the terminal can physically display the colors, surely there's a way of persuading zsh to look beyond the standard 8 colors for prompt purposes.I've looked in the handbook but that only seems to consider the existence of 8 colors, unless I've missed something.
Can any suggest how to do this?