4 alias ls='command ls -AF --color=auto'
5 alias lsbig
='command ls -flh *(.OL[1,10])' # display the biggest files
6 alias lssmall
='command ls -Srl *(.oL[1,10])' # display the smallest files
7 alias lsnew
='command ls -rl *(D.om[1,10])' # display the newest files
8 alias lsold
='command ls -rtlh *(D.om[-11,-1])' # display the oldest files
10 alias mv='command mv -i'
11 alias mmv
='noglob mmv'
12 alias cp='command cp -i'
13 alias wget
='noglob wget'
14 alias cgrep
='grep --color'
15 alias git
='LANG=C git'
16 alias rot13
='tr a-zA-Z n-za-mN-ZA-M'
18 alias psql
='LANG=C LD_PRELOAD=/lib/libreadline.so.5 psql'
19 alias tmux
='TMPDIR=/tmp tmux'
21 alias logout='noglob logout'
23 # convenient abbreviations
32 alias cd...
='cd ../..'
33 alias cd....
='cd ../../..'
34 alias cd.....
='cd ../../../..'
49 alias showpkg
='apt-cache showpkg'
50 alias acs
='apt-cache search'
51 alias acw
='apt-cache show'
52 alias agi
='LANG=C sudo aptitude install'
53 alias agr
='LANG=C sudo aptitude remove'
54 alias agp
='LANG=C sudo aptitude purge'
55 alias dclean
='LANG=C LC_ALL=C fakeroot debian/rules clean'
56 alias cpan
='perl -MCPAN -e shell'
59 alias man
='LANG=C nocorrect noglob man'
60 alias mysql
='nocorrect mysql'
61 alias mkdir
='nocorrect mkdir'
62 alias mv='nocorrect mv'
64 #global aliases. Handle with care!
68 alias -g CD
='| colordiff | less -R'
70 if [ -x /usr
/bin
/recode ]; then
71 alias unix2dos
='recode lat1..ibmpc'
72 alias dos2unix
='recode ibmpc..lat1'
75 # used when you press M-? on a command line
76 alias which-command
='whence -a'
78 # zsh function tracing
79 alias ztrace
='typeset -f -t'
80 alias zuntrace
='typeset -f +t'
82 alias gitolite_spi
='ssh git@git.spi-inc.org'
84 # Make popd changes permanent without having to wait for logout
85 alias popd="popd;dirpersiststore"
90 alias gst
='git status'
92 alias gup
='git pull --rebase'
95 alias gc
='git commit -v'
96 alias gca
='git commit -v -a'
97 alias gco
='git checkout'
98 alias gcm
='git checkout master'
100 alias grv
='git remote -v'
101 alias grmv
='git remote rename'
102 alias grrm
='git remote remove'
103 alias grset
='git remote set-url'
104 alias grup
='git remote update'
105 alias gb
='git branch'
106 alias gba
='git branch -a'
107 alias gcount
='git shortlog -sn'
108 alias gcl
='git config --list'
109 alias gcp
='git cherry-pick'
110 alias glg
='git log --stat --max-count=5'
111 alias glgg
='git log --graph --max-count=5'
112 alias glgga
='git log --graph --decorate --all'
113 alias gss
='git status -s'
116 alias grh
='git reset HEAD'
117 alias grhh
='git reset HEAD --hard'
118 alias gwc
='git whatchanged -p --abbrev-commit --pretty=medium'
119 alias gf
='git ls-files | grep'
120 alias gpoat
='git push origin --all && git push origin --tags'
122 # Will cd into the top of the current repository
124 alias grt
='cd $(git rev-parse --show-toplevel || echo ".")'
126 alias gsr
='git svn rebase'
127 alias gsd
='git svn dcommit'
129 # Will return the current branch name
130 # Usage example: git pull origin $(current_branch)
133 ref
=$
(git symbolic-ref HEAD
2> /dev
/null
) || \
134 ref
=$
(git rev-parse
--short HEAD
2> /dev
/null
) ||
return
135 echo ${ref#refs/heads/}
138 current_repository
() {
139 ref
=$
(git symbolic-ref HEAD
2> /dev
/null
) || \
140 ref
=$
(git rev-parse
--short HEAD
2> /dev
/null
) ||
return
141 echo $
(git remote
-v | cut
-d':' -f 2)
144 # these aliases take advantage of the previous function
145 alias ggpull
='git pull origin $(current_branch)'
146 alias ggpush
='git push origin $(current_branch)'
147 alias ggpnp
='git pull origin $(current_branch) && git push origin $(current_branch)'