Date: Thu, 18 Sep 2008 00:24:44 -0700 From: Christopher Cowart <ccowart@rescomp.berkeley.edu> To: "Sam Fourman Jr." <sfourman@gmail.com> Cc: User Questions <freebsd-questions@freebsd.org> Subject: Re: bash shell colors Message-ID: <20080918072444.GF66228@hal.rescomp.berkeley.edu> In-Reply-To: <11167f520809172208g655640b0w9a5ad0deb2e44f7e@mail.gmail.com> References: <11167f520809172208g655640b0w9a5ad0deb2e44f7e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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;\u@\h : \w\007\]"
| ;;
| screen*)
| TITLEBAR="\[\033k\u@\h : \w\033\134\]\[\033]0;\u@\h : \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 #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
iQIcBAEBAwAGBQJI0gI8AAoJEIGh6j3cHUNPgrcQAKLGCVf/Vrti73lzx/jJsbw7
HYIommfRsUzgVVEnaZuLEHMxxVD69v5PknVvnZlAuHX1JnZpB2pVOX2LfwQj+MZL
Fj5Vc9JbMzoMsuVCXmw2eL+hYKOtTymtrHHQoXxTsEPbq57KxxnqPyIOAr98tD6y
qia+dbJY3AVpuKWlLzh6XXVg88p7tbalD3/ypoiMvGZbWHmUPR7KwKf5NfMT4jON
3VqrR9nJ7kFxjVVkk+sSxYn/IwNol0pk/ED1qd+C+DUf2WkIrzO3qhp3ERgNr4s4
Z8d76OeD3jTOezO1hqFQniK2XgFFmCktunlqliMGXDVY0B4bsMijMfRg6EEYb8cg
fch05VFGhoI4mho9K6qVC+/3O40EYDWPbkC6iCb+cwbpM5RpK6WfCPELtTSWSd1D
kI0TK/IsSMCosW6lTd1I/rM2QS8DdDsBwbIfEpq/U+jG882QjJZBEuZgvgavIoq+
2UBcYxZJ3oWF6mw+Xq0G4vSrSuOVKJgYWaLtycpN4fBHv/QwLTa33QHlmJKRezBD
taJ61YEah9xpS3iOA/393A/PcAA73fRJq06YS5Em72sYCRCCmlIabGM0532waEoe
eIqCeSI00rTj1M9qjn9oJsMJpSh+ERhuF7VlBIAx+y8WsIeq6QvkcMEjkL4ky1+L
SDci36FgI9xUJsCzu7An
=A0LS
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080918072444.GF66228>
