Last active
January 3, 2016 02:09
-
-
Save MehulATL/8393800 to your computer and use it in GitHub Desktop.
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
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "git:("${ref#refs/heads/}$(num_git_commits_ahead)")" | |
} | |
function num_git_commits_ahead { | |
num=$(git status 2> /dev/null \ | |
| grep "Your branch is ahead of" \ | |
| awk '{split($0,a," "); print a[9];}' 2> /dev/null) || return | |
if [[ "$num" != "" ]]; then | |
echo "+$num" | |
fi | |
} | |
function path(){ | |
old=$IFS | |
IFS=: | |
printf "%s\n" $PATH | |
IFS=$old | |
} | |
export EDITOR='subl -w' | |
export PS1="\e[1;32m\$(parse_git_branch)\e[m\n\u@\h:\w \$ " | |
export PATH="/Applications/Postgres93.app/Contents/MacOS/bin:/usr/local/bin:$HOME/bin:/usr/local/sbin:~/bin:$PATH" | |
export RBENV_ROOT=/usr/local/var/rbenv | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export JDK_HOME=$(/usr/libexec/java_home) | |
export ANDROID_HOME=/usr/local/Cellar/android-sdk/22.6/ | |
alias such=git | |
alias very=git | |
alias wow='git status' | |
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' | |
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' | |
alias showPorts='lsof -i' | |
alias selfie='lolcommits --browse' | |
alias br='source ~/.bash_profile' | |
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM | |
# New environment setting added by BB10 WebWorks SDK on Mon Apr 07 21:37:33 PDT 2014 1. | |
# The unmodified version of this file is saved in /Users/mehul/.bash_profile320356265. | |
# Do NOT modify these lines; they are used to uninstall. | |
WEBWORKS_HOME="/Applications/BB10 WebWorks SDK 2.0.0.71" | |
export WEBWORKS_HOME | |
# End comments by InstallAnywhere on Mon Apr 07 21:37:33 PDT 2014 1. | |
# New environment setting added by BB10 WebWorks SDK on Mon Apr 07 21:37:33 PDT 2014 2. | |
# The unmodified version of this file is saved in /Users/mehul/.bash_profile320356265. | |
# Do NOT modify these lines; they are used to uninstall. | |
PATH="$WEBWORKS_HOME:$WEBWORKS_HOME/cordova-blackberry/bin/dependencies/bb-tools/bin:${PATH}" | |
export PATH | |
# End comments by InstallAnywhere on Mon Apr 07 21:37:33 PDT 2014 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment