List Rake Tasks by Default

January 27, 2013


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.

« | Home | »