X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Frake-fast%2Frake-fast.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Frake-fast%2Frake-fast.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=19dab154bac9fd197dbd54e6479e6da6167205ab;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/rake-fast/rake-fast.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/rake-fast/rake-fast.plugin.zsh deleted file mode 100644 index 19dab15..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/rake-fast/rake-fast.plugin.zsh +++ /dev/null @@ -1,43 +0,0 @@ -_rake_does_task_list_need_generating () { - [[ ! -f .rake_tasks ]] || [[ Rakefile -nt .rake_tasks ]] || { _is_rails_app && _tasks_changed } -} - -_is_rails_app () { - [[ -e "bin/rails" ]] || [[ -e "script/rails" ]] -} - -_tasks_changed () { - local -a files - files=(lib/tasks lib/tasks/**/*(N)) - - for file in $files; do - if [[ "$file" -nt .rake_tasks ]]; then - return 0 - fi - done - - return 1 -} - -_rake_generate () { - rake --silent --tasks | cut -d " " -f 2 | sed 's/\[.*\]//g' > .rake_tasks -} - -_rake () { - if [[ -f Rakefile ]]; then - if _rake_does_task_list_need_generating; then - echo "\nGenerating .rake_tasks..." >&2 - _rake_generate - fi - compadd $(cat .rake_tasks) - fi -} -compdef _rake rake - -rake_refresh () { - [[ -f .rake_tasks ]] && rm -f .rake_tasks - - echo "Generating .rake_tasks..." >&2 - _rake_generate - cat .rake_tasks -}