-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
118 lines (105 loc) · 2.86 KB
/
zshrc
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Allow local customizations in the ~/.shell_local_before file
if [ -f ~/.shell_local_before ]; then
source ~/.shell_local_before
fi
# Allow local customizations in the ~/.zshrc_local_before file
if [ -f ~/.zshrc_local_before ]; then
source ~/.zshrc_local_before
fi
alias chrome="open -a 'Google Chrome'"
# Git Aliases
alias glog='git log --pretty=oneline'
alias gi='git ignore'
alias gs='git status'
alias ga='git add'
alias gap='git add -p'
alias gaa='git add .'
alias gcam='git add . && git commit -am'
alias gam='git commit --amend'
alias gc='git commit'
alias gcm='git commit -m'
alias gb='git branch'
alias gbr='gb'
alias gbd='git branch -d'
alias gbD='git branch -D'
alias gbmv='git branch -m'
alias gmv='git branch -m'
alias gd='git diff'
alias gt='git checkout'
alias gp='git pull'
alias gpo='git pull origin'
# Got this alias from https://stackoverflow.com/questions/6089294/why-do-i-need-to-do-set-upstream-all-the-time
alias gpush='git push -u origin HEAD'
alias gpull='git pull'
alias gpsh='gpush'
alias gm='git merge'
alias gmm='git merge main'
alias gclone='git clone'
alias gsw='git switch'
alias gswc='git switch -c'
alias gclean='git stash -u && git stash drop'
alias gstash='git stash -u'
# Github
alias ghprc='gh pr create'
alias ghprv='gh pr view --web'
alias ghprs='gh pr status'
alias ghprls='gh pr list'
alias ghprm='gh pr merge'
alias ghils='gh issues list'
alias ghprcl='gh pr close'
# npm aliases
alias ni='npm install'
alias nis='npm install --save'
alias nid='npm install --save-dev'
alias nig='npm install --global'
alias nu='npm uninstall'
alias nug='npm uninstall -g'
alias nus='npm uninstall -S'
alias nud='npm uninstall -D'
alias nt='npm test'
alias nit='npm install && npm test'
alias nk='npm link'
alias nr='npm run'
alias nrd='npm run dev'
alias nrb='npm run build'
alias ns='npm start'
alias nf='npm cache clean && rm -rf node_modules && npm install'
alias nlg='npm list --global --depth=0'
# yarn aliases
alias y="yarn"
alias ys="yarn start"
alias yt="yarn test"
alias yd='yarn dev'
alias yb="yarn build"
alias ya="yarn add"
alias yad="yarn add --dev"
alias yga="yarn global add"
alias yl="yarn lint"
alias yf="yarn format"
# python aliases
alias pip="pip3"
# shell aliases
alias mv="mv -iv"
alias cp="cp -riv"
alias mkdir="mkdir -vp"
alias ls="lsd"
alias ll="ls -lah"
alias la="ls -A"
alias l="ls"
# zsh aliases
alias zshr="source ~/.dotfiles/zshrc"
alias zsho="code ~/.dotfiles/zshrc"
# misc commands
alias migra="docker run --network=host djrobstep/migra migra"
# Allow local customizations in the ~/.shell_local_after file
if [ -f ~/.shell_local_after ]; then
source ~/.shell_local_after
fi
# Allow local customizations in the ~/.zshrc_local_after file
if [ -f ~/.zshrc_local_after ]; then
source ~/.zshrc_local_after
fi
# Allow private customizations (not checked in to version control)
if [ -f ~/.shell_private ]; then
source ~/.shell_private
fi