# File lib/rake.rb, line 2000
2000:     def display_tasks_and_comments
2001:       displayable_tasks = tasks.select { |t|
2002:         t.comment && t.name =~ options.show_task_pattern
2003:       }
2004:       if options.full_description
2005:         displayable_tasks.each do |t|
2006:           puts "rake #{t.name_with_args}"
2007:           t.full_comment.split("\n").each do |line|
2008:             puts "    #{line}"
2009:           end
2010:           puts
2011:         end
2012:       else
2013:         width = displayable_tasks.collect { |t| t.name_with_args.length }.max || 10
2014:         max_column = 80 - name.size - width - 7
2015:         displayable_tasks.each do |t|
2016:           printf "#{name} %-#{width}s  # %s\n",
2017:             t.name_with_args, truncate(t.comment, max_column)
2018:         end
2019:       end
2020:     end