jgeschwendt
11/4/2015 - 3:41 PM

.bash_profile

# Load the default .profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" 

# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 

# bash commands
alias bash_refresh=". ~/.bash_profile"
alias bash_edit="code ~/.bash_profile"

# path shortcuts
alias geschwendt="cd ~/GitHub/Geschwendt"
alias pm_ui="cd ~/Stash/plan-manager/plan-manager-ui"

function plz() { # run npm task runner
  npm run-script task "$*"
}

# browser shortcuts
chrome()  { open -n -b "com.google.Chrome"   --args "http://www.google.com/search?q=$*" ;}
firefox() { open -n -b "org.mozilla.firefox" --args "http://www.google.com/search?q=$*" ;}
safari()  { open -a Safari "http://www.google.com/search?q=$*" ;}

# editor shorcuts
atom()   { ATOM_CWD="$PWD"     open -n -b "com.github.atom"        --args $* ;}
code()   { VSCODE_CWD="$PWD"   open -n -b "com.microsoft.VSCode"   --args $* ;}
wstorm() { WEBSTORM_CWD="$PWD" open -n -b "com.jetbrains.WebStorm" --args $* ;}

alias git_log="git log --pretty=format:\"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --date=short"

#show / hide hidden files in Finder
function files_show() {
  defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
}
function files_hide() {
  defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder
}