Last active
November 26, 2016 11:47
-
-
Save kittinunf/5772139 to your computer and use it in GitHub Desktop.
fkung's .bash_profile
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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
[ -s "/Users/kittinun-vantasin/.scm_breeze/scm_breeze.sh" ] && source "/Users/kittinun-vantasin/.scm_breeze/scm_breeze.sh" | |
export ANDROID_HOME=~/Library/Android/sdk | |
export ANDROID_NDK=$ANDROID_HOME/ndk-bundle | |
PATH=/usr/local/sbin:/usr/local/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/ndk-bundle:$PATH | |
alias stree='open -a SourceTree' | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[0;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[0;34m\]" | |
PURPLE="\[\033[0;35m\]" | |
NO_COLOR="\[\033[0m\]" | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
function git_status { | |
printout="" | |
if current_git_status=$(git status | grep 'Changes to be committed' 2> /dev/null); then | |
printout="$printout\033[0;33m‡∆" | |
fi | |
if current_git_status=$(git status | grep 'Changes not staged for commit' 2> /dev/null); then | |
printout="$printout\033[0;32m‡∆" | |
fi | |
if current_git_status=$(git status | grep 'Untracked files' 2> /dev/null); then | |
printout="$printout\033[0;36m‡∆" | |
fi | |
echo -e $printout | |
} | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
status_icon=$(git_status) | |
echo "["${ref#refs/heads/}"]$status_icon" | |
} | |
PS1="$PURPLE\w$RED\[\$(parse_git_branch)\]$NO_COLOR\$\n$GREEN(°з°),F$NO_COLOR\$> " | |
export PATH=/usr/local/mysql/bin:$PATH | |
if [ -f `brew --prefix`/etc/autojump ]; then | |
. `brew --prefix`/etc/autojump | |
fi | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
# Tell ls to be colourful | |
export CLICOLOR=1 | |
export LSCOLORS=Exfxcxdxbxegedabagacad | |
# Tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment