seaofclouds (owner)

Revisions

gist: 23907 Download_button fork
public
Public Clone URL: git://gist.github.com/23907.git
Embed All Files: show embed
git branch in prompt #
1
2
3
4
5
6
7
8
9
# get git branch name
 
parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
 
# set prompt
PS1="\[\e[37;45;1m\][\u@\h]\[\e[0m\[\e[35m\] \w\$(parse_git_branch) #\[\e[0m\] "