Colores Prompt


El código del PROMPT es el siguiente (sacado de /etc/profile, para despistados):
export PS1="[\\e[32;1m\\u\\e[0m@\\e[35;1m\\h\\e[0m: \\e[36;1m\\W\\e[0m] \\$ "
Actualización
En FreeBSD \'$\' no funciona, debería cambiar el símbolo del prompt dependiendo si estás como root o no, aquí dejo el parche:if [ "`id -u`" -eq 0 ]; then
export PS1="[\\e[32;1m\\u\\e[0m@\\e[35;1m\\h\\e[0m: \\e[36;1m\\W\\e[0m] # "
else
export PS1="[\\e[32;1m\\u\\e[0m@\\e[35;1m\\h\\e[0m: \\e[36;1m\\W\\e[0m] $ "
fi
Otro más
No sé si es exactamente el mismo o no, pero ahí queda por si las moscas:# export PS1="[\\[\\033[32m\\]\\u\\\\[\\033[37m\\]@\\[\\033[35m\\]\\h\\[\\033[00m]: \\[\\033[36m\\]\\w[\\033[00m\\]] # "
Códigos de colores
Por si hace falta para más adelante, aquí dejo los códigos de colores:RS="\\[\\033[0m\\] # reset
HC=\\[\\033[1m\\] # hicolor
UL=\\[\\033[4m\\] # underline
INV=\\[\\033[7m\\] # inverse background and foreground
FBLK=\\[\\033[30m\\] # foreground black
FRED=\\[\\033[31m\\] # foreground red
FGRN=\\[\\033[32m\\] # foreground green
FYEL=\\[\\033[33m\\] # foreground yellow
FBLE=\\[\\033[34m\\] # foreground blue
FMAG=\\[\\033[35m\\] # foreground magenta
FCYN=\\[\\033[36m\\] # foreground cyan
FWHT=\\[\\033[37m\\] # foreground white
BBLK=\\[\\033[40m\\] # background black
BRED=\\[\\033[41m\\] # background red
BGRN=\\[\\033[42m\\] # background green
BYEL=\\[\\033[43m\\] # background yellow
BBLE=\\[\\033[44m\\] # background blue
BMAG=\\[\\033[45m\\] # background magenta
BCYN=\\[\\033[46m\\] # background cyan
BWHT=\\[\\033[47m\\] # background white
Pantallazo de colores
