Browse files

Moved global options to bottom of task listing

  • Loading branch information...
1 parent 34682ae commit b0ccd90bda5004cc4aa57c0e280a0ff2a455d5c3 @fabien fabien committed Oct 11, 2008
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/thor/runner.rb
View
9 lib/thor/runner.rb
@@ -227,15 +227,16 @@ def display_tasks(klass, max_base, max_left)
puts "\033[1;34m#{base}\033[0m"
puts "-" * base.length
- unless klass.opts.empty?
- puts "global options: #{Options.new(klass.opts)}\n\n"
- end
-
klass.tasks.each true do |name, task|
format_string = "%-#{max_left + max_base + 5}s"
print format_string % task.formatted_usage(true)
puts task.description
end
+
+ unless klass.opts.empty?
+ puts "\nglobal options: #{Options.new(klass.opts)}"
+ end
+
puts # add some spacing
end
end

0 comments on commit b0ccd90

Please sign in to comment.