Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (36 sloc) 1.09 KB
#!/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 <barr@cs.ucdavis.edu>"'
# utility -- these may get promoted to ~/.bash_* or ~/bin later
alias git-branch-current='git-branch --no-color | egrep "^\*" | cut -c 3-'