aliases.zsh 1.68 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
Geoff Garside's avatar
Geoff Garside committed
47
alias ls='ls -F'
Gerhard Lazu's avatar
Gerhard Lazu committed
48
alias lsa='ls -lahG'
To1ne's avatar
To1ne committed
49
alias l='ls -la'
50
51
alias ll='ls -alr'
alias sl=ls # often screw this up
52
53
54

alias sgem='sudo gem'

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

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

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

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