Sam Fourman Jr. wrote:
> 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.

This is also heavily inspired by gentoo, but has some hooks that will
help you with customizing the colors. For the full guide of what all the
\-escaped sequences mean, see the PROMPTING section of the bash man
page.

| # Some variables that make it easy to do things in color
| BLUE="\[\033[0;34m\]"
| BBLUE="\[\033[1;34m\]"
| RED="\[\033[0;31m\]"
| LIGHT_RED="\[\033[1;31m\]"
| WHITE="\[\033[1;37m\]"
| NOCOLOR="\[\033[0m\]"
| BLACK="\[\033[30;47m\]"
| RED2="\[\033[31;47m\]"
| GREEN="\[\033[0;32m\]"
| BGREEN="\[\033[1;32m\]"
| BYELLOW="\[\033[1;33m\]"
| BLUE2="\[\033[34;47m\]"
| MAGENTA="\[\033[35;47m\]"
| CYAN="\[\033[36;47m\]"
| BCYAN="\[\033[1;36m\]"
| WHITE2="\[\033[37;47m\]"
| TEAL="\[\033[0;36m\]"
| 
| # This sets PS1 so that xterm names and screen window listings are
| # automatically populated with the contents of your prompt. You may
| # find it useful if you use xterm or rxvt or screen, but will probably
| # want to omit it otherwise.
| case $TERM in
|       xterm*|rxvt*)
|         TITLEBAR="\[\033]0;[EMAIL PROTECTED] : \w\007\]"
|         ;;
|       screen*)
|         TITLEBAR="[EMAIL PROTECTED] : \w\033\134\]\[\033]0;[EMAIL PROTECTED] 
: \w\007\]"
|         ;;
|       *)
|         TITLEBAR=""
|         ;;
| esac
| 
| PS1="${BGREEN}\\u ${BCYAN}\\h ${BGREEN}\\W${BCYAN} \\\$${NOCOLOR} ${TITLEBAR}"
| SUDO_PS1=$PS1
| export PS1 SUDO_PS1

-- 
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley

Attachment: pgp5faO4MLIhZ.pgp
Description: PGP signature

Reply via email to