Skip to content

Instantly share code, notes, and snippets.

@MikaAK
Last active August 29, 2015 14:02
Show Gist options
  • Save MikaAK/6b6ab9d44ffcbef60f5f to your computer and use it in GitHub Desktop.
Save MikaAK/6b6ab9d44ffcbef60f5f to your computer and use it in GitHub Desktop.
.bash_profile
# get current branch in git repo
parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\e[32m\]\u\[\e[m\]\[\e[32m\]:\[\e[m\]\[\e[36m\]\W\[\e[m\] \[\e[35m\]\`parse_git_branch\`\[\e[m\]\[\e[33m\]\\$\[\e[m\] "
# some more ls aliases
alias ls='ls -F'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
export CLICOLOR=1
export LSCOLORS=cxfxgxdxbxegedabagacad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment