Skip to content

Commit

Permalink
Added proper :default namespace task display
Browse files Browse the repository at this point in the history
  • Loading branch information
fabien committed Oct 11, 2008
1 parent b0ccd90 commit d290c8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/thor/runner.rb
Expand Up @@ -222,9 +222,15 @@ def display_klasses(with_modules = false, klasses = Thor.subclasses)

def display_tasks(klass, max_base, max_left)
if klass.tasks.values.length > 1

base = Thor::Util.constant_to_thor_path(klass.name)

puts "\033[1;34m#{base}\033[0m"
if base.to_a.empty?
base = 'default'
puts "\033[1;35m#{base}\033[0m"
else
puts "\033[1;34m#{base}\033[0m"
end
puts "-" * base.length

klass.tasks.each true do |name, task|
Expand Down

0 comments on commit d290c8e

Please sign in to comment.