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

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

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

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

To1ne's avatar
To1ne committed
27
# Git related
Geoff Garside's avatar
Geoff Garside committed
28
alias g='git'
29
30
alias gst='git status'
alias gl='git pull'
31
alias gup='git fetch && git rebase'
32
33
alias gp='git push'
alias gd='git diff | mate'
Gerhard Lazu's avatar
Gerhard Lazu committed
34
alias gdv='git diff -w "$@" | vim -R -'
35
36
37
38
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
39
40
alias gdb='git branch -d'
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'