Rake default == -T


#1

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.


#2

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.


#3

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


#4

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)
$


#5

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 removed_email_address@domain.invalid wrote:
[…]


#6

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,