This commit is contained in:
GitHub Merge Button 2012-01-16 13:21:59 -08:00
commit 5999ce5152
2 changed files with 22 additions and 1 deletions

View file

@ -1,4 +1,5 @@
alias ss='thin --stats "/thin/stats" start' # alias ss='thin --stats "/thin/stats" start'
alias ss='ruby script/server'
alias sg='ruby script/generate' alias sg='ruby script/generate'
alias sd='ruby script/destroy' alias sd='ruby script/destroy'
alias sp='ruby script/plugin' alias sp='ruby script/plugin'

View file

@ -0,0 +1,20 @@
function _rake_does_task_list_need_generating () {
if [ ! -f .rake_tasks ]; then return 0;
else
accurate=$(stat -f%m .rake_tasks)
changed=$(stat -f%m Rakefile)
return $(expr $accurate '>=' $changed)
fi
}
function _rake () {
if [ -f Rakefile ]; then
if _rake_does_task_list_need_generating; then
echo "\nGenerating .rake_tasks..." > /dev/stderr
rake --silent --tasks | cut -d " " -f 2 > .rake_tasks
fi
compadd `cat .rake_tasks`
fi
}
compdef _rake rake