Skip to content

Instantly share code, notes, and snippets.

@tshanks
Created August 14, 2011 13:32
Show Gist options
  • Save tshanks/1144876 to your computer and use it in GitHub Desktop.
Save tshanks/1144876 to your computer and use it in GitHub Desktop.
.bashrc for Mac OS X - CLICOLOR for ls (etc) in color, set xterm window title, and color prompt
# Only for Mac OS X, where .bashrc is otherwise ignored
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# MacPorts
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
## # GNU Coreutils
## export PATH=/opt/local/libexec/gnubin:$PATH
case "$TERM" in
xterm*|rxvt*|linux|screen|SCREEN)
# Color 'ls', etc.
export CLICOLOR=1
# Looks ugly in xterm unless you use my .Xdefaults
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# Set title
PS1="\[\e]0;\u@\h: \w\a\]$PS1"
;;
*)
#
PS1='\u@\h:\w\$ '
;;
esac
# If using git built from upstream source
if [ -x ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment