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
--RMedoP2+Pr6Rq0N2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > 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=3D"\[\033[0;34m\]" | BBLUE=3D"\[\033[1;34m\]" | RED=3D"\[\033[0;31m\]" | LIGHT_RED=3D"\[\033[1;31m\]" | WHITE=3D"\[\033[1;37m\]" | NOCOLOR=3D"\[\033[0m\]" | BLACK=3D"\[\033[30;47m\]" | RED2=3D"\[\033[31;47m\]" | GREEN=3D"\[\033[0;32m\]" | BGREEN=3D"\[\033[1;32m\]" | BYELLOW=3D"\[\033[1;33m\]" | BLUE2=3D"\[\033[34;47m\]" | MAGENTA=3D"\[\033[35;47m\]" | CYAN=3D"\[\033[36;47m\]" | BCYAN=3D"\[\033[1;36m\]" | WHITE2=3D"\[\033[37;47m\]" | TEAL=3D"\[\033[0;36m\]" |=20 | # 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=3D"\[\033]0;\u@\h : \w\007\]" | ;; | screen*) | TITLEBAR=3D"\[\033k\u@\h : \w\033\134\]\[\033]0;\u@\h : \w\007\]" | ;; | *) | TITLEBAR=3D"" | ;; | esac |=20 | PS1=3D"${BGREEN}\\u ${BCYAN}\\h ${BGREEN}\\W${BCYAN} \\\$${NOCOLOR} ${TIT= LEBAR}" | SUDO_PS1=3D$PS1 | export PS1 SUDO_PS1 --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --RMedoP2+Pr6Rq0N2 Content-Type: application/pgp-signature Content-Disposition: inline -----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----- --RMedoP2+Pr6Rq0N2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080918072444.GF66228>