From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 07:24:48 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EAE1065678 for ; Thu, 18 Sep 2008 07:24:48 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC4C8FC17 for ; Thu, 18 Sep 2008 07:24:48 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 315403C0526; Thu, 18 Sep 2008 00:24:46 -0700 (PDT) Date: Thu, 18 Sep 2008 00:24:44 -0700 From: Christopher Cowart To: "Sam Fourman Jr." Message-ID: <20080918072444.GF66228@hal.rescomp.berkeley.edu> Mail-Followup-To: "Sam Fourman Jr." , User Questions References: <11167f520809172208g655640b0w9a5ad0deb2e44f7e@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="RMedoP2+Pr6Rq0N2" Content-Disposition: inline In-Reply-To: <11167f520809172208g655640b0w9a5ad0deb2e44f7e@mail.gmail.com> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Cc: User Questions Subject: Re: bash shell colors X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 07:24:48 -0000 --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--