-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.project-aliases
47 lines (36 loc) · 1.09 KB
/
.project-aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
function grep_project {
grep --color -i --exclude "*.swp" -R "$1" .
}
function single_spec {
if [ -f "$1" ]
then
rake spec SPEC="$1"
else
rake spec SPEC_OPTS="-c -e '$1'"
fi
}
function single_spec_debug {
if [ -f "$1" ]
then
rdebug rake -- spec SPEC="$1"
else
rdebug rake -- spec SPEC_OPTS="-c -e '$1'"
fi
}
alias gp='grep_project'
alias sp='single_spec'
alias sd='single_spec_debug'
#TODO: get path to work properly. It seems to work initially, but when the file
# type changes, path gets overwritten and src/** gets trashed
alias project-gvim='gvim -p10 +"so .gvim-init.vim" &'
alias project-ctags='ctags -R src spec'
alias project-irb='screen-ruby.rb .screen-buffer.rb'
alias rake='rake'
alias project-todo='grep -R TODO src spec'
alias project-fixme='grep -R FIXME src spec'
alias todo='git-branch-todos $@'
alias todo-tests='grep -R TODO test/'
alias git-commit-fromearl='git commit --author "Earl Barr <[email protected]>"'
# utility -- these may get promoted to ~/.bash_* or ~/bin later
alias git-branch-current='git-branch --no-color | egrep "^\*" | cut -c 3-'