I usually spend a bit of time getting my bash terminal set up just the way that I want it. This might be superceded by zsh in the next version of the Macintosh OS (oh well...) I am writing this post just to record my current configuration for future reference.

A view of my bash terminal

Introduction

I turn off the usual welcome/start-up messages for the bashs terminal. Then I just cat the message of the day that I prefer to see. Here is the text file for that (created using figlet and a bit of color coding).

Message of the day

[36;1m                                                                                                 [33;1m _      
[36;1m                                    [33;1m        _____    [0m                            [33;1m                | |     
[36;1m                           __  __ [33;1m_    ~~~~(_____)[0m[36;1m _                               _            [33;1m |_|_    
[36;1m                          |  \/  [33;1m(_)[0m[36;1m              | |                             | |          [33;1m [__(_)   
[36;1m                          | \  / |_  ___ _ __ ___ | |__   ___ ___       _ __ _   _| | ___       [33;1m '-'\ \  
[36;1m                          | |\/| | |/ __| '__/ _ \| '_ \ / _ | __|     | '__| | | | |/ _ \     [33;1m _____| | 
[36;1m                          | |  | | | (__| | | (_) | |_) |  __|__ \     | |  | |_| | |  __/    [33;1m '-----| | 
[36;1m                          |_|  |_|_|\___|_|  \___/|_.__/ \___|___/     |_|   \__,_|_|\___|     [33;1m  ____| | 
[36;1m                          _____________________________________________________________________[33;1m /_______\ [36;1m________________
[33;1m                              
[33;1m                          Let me tell you the secret that has led me to my goal: my strength lies solely in my tenacity.                                                                                                                                       ― Louis Pasteur
[0m                                                                      

.bashrc

Here is the main bash configuration file. The main things that I want to remember are my aliases and how I set up the prompt.

# My bashrc file
#
#########################################################
cat /private/etc/motd
export PATH=~/bin:$PATH

txtblk='\e[0;30m' # Black - Regular
txtred3='\e[38;5;196;1m'
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
badgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'    # Text Reset

HOSTNAME='Clone Ranger'

print_before_the_prompt () {
    printf "\n\u250c\u2500$bldred%s: $txtylw%s $txtrst \n" " MacBookPro" "$PWD" 
}

PROMPT_COMMAND=print_before_the_prompt
PS1=$'\u2514\u2192 '

# Set up aliases
alias cls='clear'
alias dir='ls -palhF'
alias ls='ls -F'
alias del='rm -f'
alias lo='logout'
alias cleanup='rm *~; rm -f .*~'
alias mem='du -s -h -c *' 
alias nohash='sed "/^#/ d "'
alias share='python shellshare'
alias edit='open -a /Applications/TextEdit.app'
alias ql='qlmanage -p 2>/dev/null'
alias nb='bash /Users/anaerobe/scripts/ipnb.sh'
alias tt='open -a /Applications/TableTool.app'
alias trek='sst'
alias bob='cowthink -f tux "Mi pengüino está muerto"'
alias larry='cowsay "It really mooooooved me Bob."'
alias matrixc='cmatrix|lolcat'
alias matrix='cmatrix'
alias R='R --vanilla'
alias starwars='Telnet Towel.blinkenlights.nl'
alias logon='ssh clifton@159.65.38.227'
alias py='ssh -L 8888:localhost:8888 clifton@159.65.38.227'
alias x='/usr/bin/osascript -e "tell application \"terminal\" to quit"'

rpspy() { pgrep rsession | while read ppid ; do pgrep -lP $ppid ; done }

export DYLD_LIBRARY_PATH="/Users/cliftonfranklund/IBM Workplace Forms/IBM Workplace Forms Viewer.app/Contents/MacOS:/Users/cliftonfranklund/IBM Workplace Forms/IBM Workplace Forms Viewer.app/Contents/MacOS/API/70/system"

export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad

export PRINTER=HP_LaserJet_1022

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

source /Users/anaerobe/.rvm/scripts/rvm

Like somethat that you read here? Feel free to share it.