-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzprofile
73 lines (64 loc) · 1.98 KB
/
zprofile
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
65
66
67
68
69
70
71
72
73
pathadd() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="${PATH:+"$PATH:"}$1"
fi
}
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
pathadd "$HOME/bin"
fi
pathadd /usr/local/bin
pathadd /usr/local/opt/tcl-tk/bin
# Set CLICOLOR if you want Ansi Colors in iTerm2
export CLICOLOR=1
# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color
# Bash completion compat
autoload bashcompinit
bashcompinit
# paths
pathadd /Users/shibo/scripts
export GOPATH=/Users/shibo/Code/go
export GO111MODULE=auto
pathadd "$GOPATH/bin"
export PY=/Users/shibo/Code/python
export JS=/Users/shibo/Code/js
export DEV=/Users/shibo/Code/dev
pathadd "/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# aliases
alias c='clear'
alias gpp='git pull && git push'
alias gprp='git pull --rebase && git push'
alias gp='git push'
alias gpl='git pull'
alias gpr='git pull --rebase'
alias gpom='git pull origin master'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias glp='gl -p'
alias gln='gl --name-only'
alias gs='git status'
alias gb='git branch'
alias gc='git checkout'
alias gcb='git checkout -b'
alias gcm='git commit -m '
alias gca='git commit --amend'
alias gd='git diff'
alias gdh='git diff HEAD~ HEAD'
alias gds='git diff --staged'
alias gm='git merge'
alias gmf='git merge --no-ff'
alias gms='git merge --squash'
alias ga='git add'
alias gr='git reset'
alias grh='git reset --hard'
alias gst='git stash'
alias gsta='git stash apply'
alias gorigin='git remote show origin'
alias memcached-restart="launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist;launchctl load ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist"
alias agfzf='ag --nobreak --nonumbers --noheading . | fzf'
# init pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
export GPG_TTY=$(tty)
export AWS_PROFILE=mfa