I have a poor memory, especially for things a computer should do for me. Frustrated with Rake commands (is it logs:clear or log:clear?) I turned to Bash completion. A web search found this basic implementation. Because it called rake -T on each invocation, it was unusably slow. Another search found Jonathan Palardy’s implementation with caching. Nice.
In any case, here in all its glory, a bash-completion for Rake. It caches automatically so all but the first use is fast. It also checks for a tmp/cache directory (present in Rails projects) and places the cache in there if available. This saves you from having to add the .rake_t_cache file to your SCM’s ignore list.
This entry was posted in Coding. Bookmark the permalink. Both comments and trackbacks are currently closed.