mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Merge ab9d41543c into 1a0be15d8c
This commit is contained in:
commit
5999ce5152
2 changed files with 22 additions and 1 deletions
|
|
@ -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'
|
||||||
|
|
|
||||||
20
plugins/rake/rake.plugin.zsh
Normal file
20
plugins/rake/rake.plugin.zsh
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue