Permalink
Browse files

Added proper :default namespace task display

  • Loading branch information...
1 parent b0ccd90 commit d290c8ef14f19d5dd01fddf5fccad2ee564e2669 @fabien fabien committed Oct 11, 2008
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/thor/runner.rb
View
@@ -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|

0 comments on commit d290c8e

Please sign in to comment.