Last active
August 27, 2018 12:31
-
-
Save ppeelen/d46f1daf74273469b2311c57ebbe23a5 to your computer and use it in GitHub Desktop.
My bash profile
This file contains hidden or 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
# Update the path with other important bin folders | |
export PATH=$(echo $PATH | sed 's|/usr/local/bin||; s|/usr/local/sbin||; s|::|:|; s|^:||; s|\(.*\)|/usr/local/bin:/usr/local/sbin:\1|') | |
PATH="$PATH:~/bin:$HOME/.rvm/bin" | |
# Adding Bash Completion | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# Show a different color on master & develop branch | |
## Checkout https://stackoverflow.com/a/12871094/406677 if __git_ps1 is missing | |
function git_branch_color() { | |
[[ $(__git_ps1 '%s') = 'master' || $(__git_ps1 '%s') = 'develop' ]] && echo '31' || echo '36'; | |
} | |
## Git scripts | |
PS1="\[\033[1;37m\]\h:\[\033[33;1m\]\w\[\033[m\]\[\033[\$(git_branch_color)m\]\$(__git_ps1 '@%s')\[\033[m\]\$ " | |
export LS_COLORS=$LS_COLORS:'di=0;35:' | |
# Setting helpfull aliasses | |
alias cleanDerived="rm -rf ~/Library/Developer/Xcode/DerivedData/*" | |
alias updateWithDev="git checkout develop; git pull; git checkout -" | |
alias openWorkspace="open *.xcworkspace" | |
alias openProject="open *.xcodeproj" | |
alias gd="git diff" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment