Skip to content

Instantly share code, notes, and snippets.

@AgiosAndreas
Created May 18, 2012 13:33
Show Gist options
  • Save AgiosAndreas/2725298 to your computer and use it in GitHub Desktop.
Save AgiosAndreas/2725298 to your computer and use it in GitHub Desktop.
source ~/.git-completion.bash
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
function proml {
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
\u@\h:\w\$(parse_git_branch)\
\$ "
PS2='> '
PS4='+ '
}
proml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment