Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rake completion



> If you're using Rails, this completion for the rake command might come
> in handy:
> 
>   http://weblog.rubyonrails.com/articles/2006/03/09/fast-rake-task-completion-for-zsh

That could be rewritten to something like the following, but we already
distribute a rake completion function.  It would probably be better to
modify that to add caching-layer support and address any other
deficiencies rake users might point out.

#compdef rake

if [[ -f Rakefile ]]; then
  if [[ ! -f .rake_tasks ]] || [[ .rake_tasks -ot Rakefile ]]; then
    print ${${(f)"$(rake --silent --tasks)"}#* } > .rake_tasks
  fi
  compadd $(cat .rake_tasks)
fi



Messages sorted by: Reverse Date, Date, Thread, Author