Created
October 18, 2011 01:12
-
-
Save ddeyoung/1294376 to your computer and use it in GitHub Desktop.
Set git autocompletion and PS1 integration
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
# Install bash completion | |
$ brew install bash-completion | |
# Install Homebrew's own completion script: | |
$ ln -s "/usr/local/Library/Contributions/brew_bash_completion.sh" "/usr/local/etc/bash_completion.d" |
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 the following to your .bash_profile | |
# include $HOME/bin in your path | |
export PATH="$HOME/bin:$PATH" | |
# Set git autocompletion and PS1 integration | |
GIT_PS1_SHOWDIRTYSTATE=true | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment