imwally and this is my blog...

soytea (at) gmail (dot) com

November 29, 2008 at 11:56am
Home

Customized BASH with Simplified Colors

I edited my .bash_profile on my older MBP and forgot to save it. I got bored this morning and made a fresh one…
Fun with BASH Colors
For anyone interested in my profile (with simplified coloring)…

# Text formatting
bold="\e[1m"    #Bold Text
uline="\e[4m"   #Underline Text
blink="\e[5m"   #Blink Text
inverse="\e[7m" #Inverse Text

# Foreground colors:
blk="\e[0;30m" # Black
red="\e[0;31m" # Red
grn="\e[0;32m" # Green
yel="\e[0;33m" # Yellow \ Orange
blu="\e[0;34m" # Blue
mag="\e[0;35m" # Magenta
cyn="\e[0;36m" # Cyan
gry="\e[0;37m" # Light Gray \ Black
wht="\e[0;39m" # Default

# Background colors:
BGblk="\e[40m" # Black
BGred="\e[41m" # Red
BGgrn="\e[42m" # Green
BGyel="\e[43m" # Yellow
BGblu="\e[44m" # Blue
BGmag="\e[45m" # Magenta
BGcyn="\e[46m" # Cyan
BGgry="\e[47m" # Light Gray \ Black
BGdef="\e[49m" # Default

 
export PS1="$grn$BGgrn \A  \d $blk$BGgrn  【\w】\n$wht\u $cyn@ $blu\h $wht: "

Notes