Created
July 1, 2015 12:53
-
-
Save bunlongheng/e5ed5d5811b4fff06d2a to your computer and use it in GitHub Desktop.
My favorite .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
#================================================ | |
# Bunlong Heng 4/23/2015 = | |
#================================================ | |
#Environment Variables | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export PATH=~/.composer/vendor/bin:$PATH | |
#Alias | |
#Goto | |
alias avn='cd /Applications/MAMP/htdocs/code/aveniros' | |
alias code='cd /Applications/MAMP/htdocs/code' | |
alias bi='cd ~/dev/projects/biv2/' | |
alias .hs='cd ~/.homestead' | |
alias d='cd ~/Desktop' | |
alias htdocs='cd /Applications/MAMP/htdocs' | |
alias gen='cd /Applications/MAMP/htdocs/bheng/generator' | |
alias bheng='cd /Applications/MAMP/htdocs/bheng' | |
alias 2015='cd /Applications/MAMP/htdocs/bheng/bunlonghengcom' | |
alias md-bheng='cd /Applications/MAMP/htdocs/bheng/md-bheng' | |
alias hs='cd /Applications/MAMP/htdocs/code/Homestead' | |
#Vagrant | |
alias vup='vagrant up' | |
alias local='ssh vagrant@127.0.0.1 -p 2222' | |
alias staging='ssh root@45.33.69.160' | |
#Mac OS | |
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 L='ls -lrt' | |
alias open_history='subl ~/.bash_history' | |
alias open_bash='subl ~/.bash_profile' | |
alias open_jshint='subl ~/dev/sublimetext/.jshintrc' | |
alias open_host='subl /etc/hosts' | |
alias open_hs='subl ~/.homestead/Homestead.yaml' | |
#================================ | |
# Colors = | |
#================================ | |
black="\[\033[0;30m\]" | |
blue="\[\033[0;37m\]" | |
green="\[\033[0;32m\]" | |
cyan="\[\033[0;36m\]" | |
red="\[\033[0;31m\]" | |
purple="\[\033[0;35m\]" | |
brown="\[\033[0;33m\]" | |
darkgray="\[\033[0;30m\]" | |
lightgray="\[\033[1;37m\]" | |
lightblue="\[\033[1;34m\]" | |
lightgreen="\[\033[1;32m\]" | |
lightcyan="\[\033[1;36m\]" | |
lightred="\[\033[1;31m\]" | |
lightpurple="\[\033[1;35m\]" | |
yellow="\[\033[1;33m\]" | |
orange="\[\033[1;40m\]" | |
white="\[\033[1;37m\]" | |
nc="\[\033[0m\]" | |
prompt_cmd () { | |
case $PWD in | |
~/dev/projects/biv2 ) dircolor=$yellow ;; | |
/Applications/MAMP/htdocs/bheng/bunlonghengcom ) dircolor=$lightcyan ;; | |
/Applications/MAMP/htdocs/code/aveniros ) dircolor=$lightred;; | |
/Applications/MAMP/htdocs/bheng/generator ) dircolor=$lightblue;; | |
# and so on. For any other directory, | |
*) dircolor=$green | |
esac | |
PS1="──$white[$dircolor\w$white] \n└── $white" | |
} | |
PROMPT_COMMAND=prompt_cmd | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment