aliases.zsh 1.71 KB
Newer Older
To1ne's avatar
To1ne committed
1
2
3
#!/bin/zsh

# Push and pop directories on directory stack
4
5
alias pu='pushd'
alias po='popd'
6

7
alias ss='thin --stats "/thin/stats" start'
8
9
10
11
12
alias sg='ruby script/generate'
alias sd='ruby script/destroy'
alias sp='ruby script/plugin'
alias ssp='ruby script/spec'
alias rdbm='rake db:migrate'
13
14
alias sc='ruby script/console'
alias sd='ruby script/server --debugger'
15
alias devlog='tail -f log/development.log'
16

To1ne's avatar
To1ne committed
17
# Basic directory operations
18
19
alias .='pwd'
alias ...='cd ../..'
20
alias -- -='cd -'
21

To1ne's avatar
To1ne committed
22
# Super user
23
alias _='sudo'
24
alias ss='sudo su -'
25

Geoff Garside's avatar
Geoff Garside committed
26
#alias g='grep -in'
27

To1ne's avatar
To1ne committed
28
# Git related
Geoff Garside's avatar
Geoff Garside committed
29
alias g='git'
30
31
alias gst='git status'
alias gl='git pull'
32
alias gup='git fetch && git rebase'
33
34
alias gp='git push'
alias gd='git diff | mate'
Gerhard Lazu's avatar
Gerhard Lazu committed
35
alias gdv='git diff -w "$@" | vim -R -'
36
37
38
39
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
40
41
alias gdb='git branch -d'
alias gcount='git shortlog -sn'
42
alias gcp='git cherry-pick'
43

To1ne's avatar
To1ne committed
44
# Show history
45
46
alias history='fc -l 1'

To1ne's avatar
To1ne committed
47
# List direcory contents
48
alias ls='ls -F -G'
Gerhard Lazu's avatar
Gerhard Lazu committed
49
alias lsa='ls -lahG'
To1ne's avatar
To1ne committed
50
alias l='ls -la'
51
52
alias ll='ls -alr'
alias sl=ls # often screw this up
53
54
55

alias sgem='sudo gem'

To1ne's avatar
To1ne committed
56
# Find ruby file
57
alias rfind='find . -name *.rb | xargs grep -n'
Gerhard Lazu's avatar
Gerhard Lazu committed
58
alias afind='ack-grep -il'
59

To1ne's avatar
To1ne committed
60
# Git and svn mix
61
62
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'

To1ne's avatar
To1ne committed
63
# TextMate
Geoff Garside's avatar
Geoff Garside committed
64
65
66
67
alias et='mate . &'
alias ett='mate app config lib db public spec test Rakefile Capfile Todo &'
alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
To1ne's avatar
To1ne committed
68
69

# Editor Ruby file in TextMate
70
alias mr='mate CHANGELOG app config db lib public script spec test'