Last active
December 14, 2015 11:19
-
-
Save jamesejr/5078659 to your computer and use it in GitHub Desktop.
Personal .bashrc file with Terminal colors, Homebrew tab completion, and custom Bash/Git prompts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Git branch prompt | |
function git-current-branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
} | |
# Add custom bash prompt via kirsle.net/wizards/ps1.html | |
export PS1="\u@macbook \[$(tput setaf 2)\][\W] \[$(tput setaf 1)\]\$(git-current-branch)\[$(tput setaf 7)\]> \[$(tput sgr0)\]" | |
# Add Git auto completion support | |
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash | |
# Add custom profile alias and variables | |
export DEV="$HOME/Development" | |
# Add terminal colors, and fun stuff | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
# Add Homebrew command-tab completion support | |
source `brew --repository`/Library/Contributions/brew_bash_completion.sh | |
# Add rvm to path for scripting | |
PATH=$PATH:$HOME/.rvm/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment