forked from campuscode/cc_dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
168 lines (141 loc) · 3.72 KB
/
aliases
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Based on Skwp's aliases
# https://raw.githubusercontent.com/skwp/dotfiles/997d36bef991652dd436c076e57d8f00c49f4994/zsh/aliases.zsh
ccdf=$HOME/.cc_dotfiles
# global
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
# PS
alias psa="ps aux"
alias psg="ps aux | grep "
alias psr='ps aux | grep ruby'
# Moving around
alias cdb='cd -'
alias cls='clear;ls'
alias clr='clear'
# Show human friendly numbers and colors
alias df='df -h'
alias du='du -h -d 2'
alias ll='ls -lGh'
alias la='ll -a'
alias ls='ls -Gh'
if [[ $(uname) == 'linux' ]]
then
alias ll='ls -alh --color=auto'
alias ls='ls --color=auto'
fi
# show me files matching "ls grep"
alias lsg='ll | grep'
alias lag='la | grep'
# Alias Editing
alias ae='vim $ccdf/aliases' #alias edit
alias ar='source $ccdf/aliases' #alias reload
# vim using
mvim --version > /dev/null 2>&1
MACVIM_INSTALLED=$?
if [ $MACVIM_INSTALLED -eq 0 ]; then
alias vim="mvim -v"
fi
# mimic vim functions
alias :q='exit'
# vimrc editing
alias ve='vim ~/.vimrc'
# zsh profile editing
alias ze='vim ~/.zshrc'
alias zr='source ~/.zshrc'
alias zrl='source ~/.zshrc.local'
# history
alias hfull='history 1 -1'
# Git Aliases
alias gs='git status'
alias gst='git status'
alias gsts='git stash'
alias gstsh='git stash'
alias gsp='git stash pop'
alias gsa='git stash apply'
alias gsl='git stash list'
alias gsh='git show'
alias gshw='git show'
alias gshow='git show'
alias gi='vim .gitignore'
alias gc='git c'
alias gcm='git cm'
alias gca='git ca'
alias gcam='git cam'
alias gco='git co'
alias gcp='git cp'
alias ga='git add -A'
alias guns='git unstage'
alias gunc='git uncommit'
alias gm='git merge'
alias gms='git merge --squash'
alias gam='git amend'
alias grv='git remote -v'
alias grx='git remote rm'
alias grad='git remote add'
alias gr='git rebase'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias gl='git l'
alias glg='git l'
alias glog='git l'
alias co='git co'
alias gf='git fetch'
alias gfch='git fetch'
alias gd='git diff'
alias gb='git b'
alias gbx='git branch --delete'
alias gbX='git branch -D'
alias gbd='git b -D -w'
alias gdc='git diff --cached -w'
alias gpl='git pull'
alias gplr='git pull --rebase'
alias gp='git push'
alias gpX='git push --delete'
#push current branch
alias gpsh='git push -u origin `git rev-parse --abbrev-ref HEAD`'
alias gnb='git nb' # new branch aka checkout -b
alias grs='git reset'
alias grsh='git reset --hard'
alias gcln='git clean'
alias gclndf='git clean -df'
alias gclndfx='git clean -dfx'
alias gt='git t'
alias gbg='git bisect good'
alias gbb='git bisect bad'
# Common shell functions
alias less='less -r'
alias tf='tail -f'
alias l='less'
alias lh='ls -alt | head' # see the last modified files
alias cl='clear'
# Zippin
alias gz='tar -zcvf'
# Ruby
alias tfdl='tail -f log/development.log'
alias tftl='tail -f log/test.log'
alias ka9='killall -9'
alias k9='kill -9'
# Gem install
alias sgi='sudo gem install --no-ri --no-rdoc'
alias gi='gem install --no-ri --no-rdoc'
# Forward port 80 to 3000
alias portforward='sudo ipfw add 1000 forward 127.0.0.1,3000 ip from any to any 80 in'
alias rdm='rake db:migrate'
alias rdr='rake db:rollback'
alias rdmr='rake db:migrate:redo'
alias rrs='rake routes'
# Rspec
alias rs='rspec spec'
# Rails
alias rc='rails c'
alias rsb='rails s -b 0.0.0.0'
# Finder
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'
# Homebrew
alias brewu='brew update && brew upgrade && brew cleanup && brew prune && brew doctor'
# your aliases
[[ -f ~/.aliases.local ]] && source ~/.aliases.local
# vim: ft=zsh