aliases.zsh 1.8 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

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

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

Geoff Garside's avatar
Geoff Garside committed
23
#alias g='grep -in'
24

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

To1ne's avatar
To1ne committed
41
# Show history
42
43
alias history='fc -l 1'

To1ne's avatar
To1ne committed
44
# List direcory contents
Geoff Garside's avatar
Geoff Garside committed
45
alias ls='ls -F'
Gerhard Lazu's avatar
Gerhard Lazu committed
46
alias lsa='ls -lahG'
To1ne's avatar
To1ne committed
47
alias l='ls -la'
48
49
alias ll='ls -alr'
alias sl=ls # often screw this up
50
51
52

alias sgem='sudo gem'

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

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

To1ne's avatar
To1ne committed
60
# TextMate
Geoff Garside's avatar
Geoff Garside committed
61
62
63
64
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 &'
65
66
<<<<<<< HEAD:lib/aliases.zsh
=======
Geoff Garside's avatar
Geoff Garside committed
67

To1ne's avatar
To1ne committed
68
69
70
71
72
73
74
75
## Ruby related
# Ruby scripts
alias sc='ruby script/console'
alias sd='ruby script/server --debugger'

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

76
>>>>>>> 886d97f41e72b8662232a2c6b196fb60508e4f67:lib/aliases.zsh