-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile
64 lines (53 loc) · 2.25 KB
/
.bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if typeset -f zsh >/dev/null; then
export SHELL="/bin/zsh"
else
export SHELL="/bin/bash"
fi
export BASH_SILENCE_DEPRECATION_WARNING=1
# Handy aliases
alias ..="cd .."
alias ...="cd ../.."
# Git aliases
alias gs="git status"
alias gp="git pull"
alias mp="git checkout master && git pull"
alias gc="git add . && git stash"
alias gco="git commit --no-verify"
alias gip="git push"
# Rebases the current branch with master (only works if "master" is a branch that exists)
alias rebase="git checkout master && git pull && git checkout @{-1} && git rebase master"
# Squashes all commits on the current branch into one commit (only works if "master" is your main branch)
alias squash="git reset \$(git merge-base master \$(git rev-parse --abbrev-ref HEAD))"
# Commits everything without verifications and pushes it (for a quick "crap, I need to switch branches!")
alias wip="git add . && git commit -am 'wip'; git push"
export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/opt/openssl/bin:$PATH"
export PATH="/usr/local/opt/mongodb@3.6/bin:$PATH"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH:/Users/ryanpoe/Downloads/google-cloud-sdk/bin"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Add tab completion for many Bash commands
if which brew &>/dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
source "$(brew --prefix)/share/bash-completion/bash_completion"
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
# Enable tab completion for `g` by marking it as an alias for `git`
if type _git &>/dev/null && [ -f $DIR/.git-completion.bash ]; then
complete -o default -o nospace -F _git g
fi
source $DIR/.git-completion.bash
source $DIR/.git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWCOLORHINTS=true
# Only load Liquid Prompt in interactive shells, not from a script or from scp
LP_PATH_KEEP=2
LP_PATH_LENGTH=20
LP_USER_ALWAYS=1
LP_ENABLE_LOAD=0
LP_HOSTNAME_ALWAYS=-1
[[ $- = *i* ]] && source $DIR/.liquidprompt
# Load environment secrets if they're specified
[[ -f "$DIR/.secrets" ]] && source "$DIR/.secrets"