Rake default == -T

Hi,

Is it possible to make the default task the same as using the -T
option? I.e. I want to type:

% rake

And see all the tasks.

T.

James Edward G. II <james grayproductions.net> writes:

And see all the tasks.

I assume you could make a task that shells out to rake -T.

Thanks, James. Turns out that doesn’t work so well. But your suggestion
spark an
idea and I and figured out a way:

task :default => [:tasks]

task :tasks do
Rake.application.display_tasks_and_comments
end

T.

On Apr 27, 2006, at 6:17 AM, TRANS wrote:

Hi,

Is it possible to make the default task the same as using the -T
option? I.e. I want to type:

% rake

And see all the tasks.

I assume you could make a task that shells out to rake -T.

James Edward G. II

Trans wrote:

task :default => [:tasks]

task :tasks do
Rake.application.display_tasks_and_comments
end

This doesn’t work for me, viz,

$ rake
(in /Users/kleb)
$

Apparently, with rake 0.7.1 you also need to set the regexp filtering
the tasks:

task :tasks do
Rake.application.options.show_task_pattern = //
Rake.application.display_tasks_and_comments
end

Ciao
Stefano

On 27/04/06, Trans [email protected] wrote:
[…]

Stefano T. wrote:

Apparently, with rake 0.7.1 you also need to set the regexp filtering the tasks:

task :tasks do
Rake.application.options.show_task_pattern = //
Rake.application.display_tasks_and_comments
end

Works for me now.

Thanks,