-
Notifications
You must be signed in to change notification settings - Fork 1
/
zsh_aliases
executable file
·107 lines (85 loc) · 2.08 KB
/
zsh_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
#! /bin/zsh
alias al='vim ~/.zsh_aliases ; . ~/.zsh_aliases'
alias task='ps auxw | head -n1 ; ps auxw | grep -v grep | grep'
alias h='history | grep'
alias cp='cp --preserve=mode,timestamps'
alias pg='sudo -u postgres'
alias givm='gvim'
alias lsd="echo \"DON'T DO DRUGS!!!\" ; ls"
alias be='bundle exec'
alias bi='bundle install'
alias bu='bundle update'
compdef _aptitude ap
compdef _root_command pg
alias tf='tmuxifier'
compdef _tmuxifier tf
alias ta='tmux attach -t'
compdef _tmux-attach-session ta
# ls aliases
alias la='ls -A'
alias ll='ls -l'
# git stuff
alias ci='git commit'
alias co='git checkout'
alias st='git status'
alias rb='git rebase'
alias br='git branch'
alias log='git log --oneline --graph --branches --decorate'
alias gk='gitk --all &'
alias ga='git add'
alias gau='git add -u'
alias pa='ga --patch'
alias a.='ga .'
alias gd='git diff'
alias gdd='git difftool'
alias gdc='gd --cached'
alias gddc='gdd --cached'
alias gs='git stash'
alias gsa='gs apply'
alias gsk='gs -k'
alias gm='git merge --no-ff'
alias gmff='git merge --ff'
alias gpo='git push -u origin `git branch | grep \* | cut -d " " -f2`'
compdef _git_commit ci
compdef _git_checkout co
compdef _git_rebase rb
compdef _git_svn_rebase srb
compdef _git_branch br
compdef _git_add ga
compdef _git_diff gd
compdef _git_stash gs
compdef _git_merge gm
compdef _git_merge gmff
# git flow
alias gf='git flow'
alias gff='git flow feature'
alias gfr='git flow release'
alias gfh='git flow hotfix'
# Heroku
alias hl='heroku logs --tail'
alias hc='heroku console'
# Locomotive Editor
alias le='locomotive_editor'
# Rails
function findroot()
{
while [ ! -e config/environment.rb -a `pwd` != '/' ]
do
cd ..
done
[ `pwd` != '/' ] && pwd
}
alias cdr='rr=`findroot` ; [ z$rr != z ] && cd $rr'
# Ruby
function puts_prompt
{
export RUBY_PUTS_PROMPT=yes
}
# Apache
alias a2='sudo service apache2'
# Utils
alias port='sudo lsof -i -n -P | grep TCP | grep '
# Docker
alias dr='docker run -it --rm -v ${PWD}:/app -w /app '
# NPM warning
alias npm='echo WARNING: Check ~/.npmrc to check for \`ignore-scripts\` ; \npm'