aliases.zsh 1.67 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
alias gcount='git shortlog -sn'
41
alias gcp='git cherry-pick'
42

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

To1ne's avatar
To1ne committed
46
# List direcory contents
47
alias lsa='ls -lah'
To1ne's avatar
To1ne committed
48
alias l='ls -la'
49
50
alias ll='ls -alr'
alias sl=ls # often screw this up
51
52
53

alias sgem='sudo gem'

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

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

To1ne's avatar
To1ne committed
61
# TextMate
Geoff Garside's avatar
Geoff Garside committed
62
63
64
65
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
66
67

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