Skip to content

Instantly share code, notes, and snippets.

@cduruk
Created April 7, 2009 01:59
Show Gist options
  • Save cduruk/91051 to your computer and use it in GitHub Desktop.
Save cduruk/91051 to your computer and use it in GitHub Desktop.
My .bash_profile for SL
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
$RED\w$GREEN\$(parse_git_branch) \
$GREEN\$ "
PS2='> '
PS4='+ '
}
proml
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
##
# Your previous /Users/cduruk/.bash_profile file was backed up as /Users/cduruk/.bash_profile.macports-saved_2009-09-01_at_13:37:24
##
# MacPorts Installer addition on 2009-09-01_at_13:37:24: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment