Skip to content

Instantly share code, notes, and snippets.

@devansvd
Last active July 26, 2019 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devansvd/9dd337f6f3148a3152a5960463118507 to your computer and use it in GitHub Desktop.
Save devansvd/9dd337f6f3148a3152a5960463118507 to your computer and use it in GitHub Desktop.
My bashrc
# Get the Git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Custom bash prompt
#
# Includes custom character for the prompt, path, and Git branch name.
#
# Source: kirsle.net/wizards/ps1.html and https://github.com/mdo/config
export PS1="\[$(tput bold)\]\[$(tput setaf 5)\]➜ \[$(tput setaf 6)\]\w\[$(tput setaf 3)\]\$(parse_git_branch) \[$(tput sgr0)\]"
# Aliases
alias ll='ls -al'
alias vi=vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment