Hi,

I use something like this (heavily inspired by Gentoo):

if [[ ${EUID} == 0 ]] ; then
  PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
  PS1='\[\033[01;[EMAIL PROTECTED];34m\] \w \$\[\033[00m\] '
fi

One could maybe also include a check of $TERM for different terminal types, not all of them will understand color escape sequences. And of course tools like ls and grep do colorized output themselves when called with appropriate options.

This is described in the PROMPTING section of Bash's manpage. I did not find any documentation for the exact codes for ANSI color escape sequences.

Anselm


On Sep 18, 2008, at 07:08 , Sam Fourman Jr. wrote:

Hello list,

I am looking to configure FreeBSD's Bash
can anyone post a config file that would make FreeBSD's Bash shell
color code like the default gentoo bash shell

or if you have a config that you like and feel like posting it I will
take a look at it.


Sam Fourman Jr.
Fourman Networks

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to