List Rake Tasks by Default

I add this to all my Rakefiles.

task :default do
  system "rake --tasks"
end

It prints a list of Rake tasks when you run Rake without a command. Not only does it help you remember what options are available in the current project, but it keeps you from accidentally performing some task if you fat-finger the rake command.

Want to comment? Follow @blog@jimkubicek.com on Mastodon and reply to this post. Search for this URL in your Mastodon client:

https://jimkubicek.com/2013/01/27/list-rake-tasks-by-default/