It can be read in Configuration-HOWTO that bash's prompt can be colored
just adding some lines to "/etc/bashrc":
---------------------------------------------------
COLOUR=45
if [ $USER = 'root' ] ; then
COLOUR=41 # red
PATH="$PATH:/usr/local/bin"
fi
ESC="\033"
STYLE=';1m' # bold; choose which one to use
# STYLE='m' # plain
PS1="\[$ESC[$COLOUR;37$STYLE\]$USER:\[$ESC[37;40$STYLE\]\w\\$ "
PS2="> "
-----------------------------------------
Several questions about it:
1. What is this "\033\" for and what does this mean?
I read something in Keyboard-and-Console-HOWTO but I understand nothing
about "stty -sane ...etc" or unimap codes... Don't know what that mean.
2. This issue works with COLOUR within a range from 40-47: as I
understand from /etc/DIR_COLORS these are background colors, if
dircolors is related to this. But doesn't work properly with colours
from 30-37 which are "Text" color codes if I change ';1m' for 'm' in
STYLE...
3. Cannot found in DIR_COLORS info what this thing of: "STYLE" means. I
mean... color 30 is black text... but what does it mean ';1m' or 'm'
mentioned as $STYLE ???
Anybody who tries to change colors from 40-47 with the 'm' style can see
it doesn't work properly.
Where can I find info?
I just want to have a full customizable bash prompt in order to impress
my Windoze friends with Linux beauties (and because I like it)!!!
;)
--
J. M. Albores