Skip to content

Instantly share code, notes, and snippets.

@madeindjs
Created March 10, 2017 13:24
Show Gist options
  • Save madeindjs/42b3a8889169d98fc6ad4c0d522892a9 to your computer and use it in GitHub Desktop.
Save madeindjs/42b3a8889169d98fc6ad4c0d522892a9 to your computer and use it in GitHub Desktop.
My custom bashrc properties
# Change PS1 display
function parse_git_branch()
{
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# arousseau ~/www (feature/5651) $
PS1="\[\e[1;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\]\[\033[31m\]\$(parse_git_branch)\[\033[00m\] \$ "
# ~/www (feature/5651) $
PS1="\[\e[1;34m\]\w\[\e[m\]\[\033[31m\]\$(parse_git_branch)\[\033[00m\] \$ "
# alias to edit & refresh bashrc
alias vb="vi ~/.bashrc;source ~/.bashrc"
# set APPLICATION_ENV
export APPLICATION_ENV=development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment