Permalink
Browse files

Make no-color output consistent with color output

  • Loading branch information...
1 parent 4e84e4d commit 0be1daac342d50c5480e2817827abb72a93615ef @sferik committed Apr 28, 2012
Showing with 185 additions and 331 deletions.
  1. +5 −1 lib/t/printable.rb
  2. +128 −188 spec/cli_spec.rb
  3. +32 −47 spec/list_spec.rb
  4. +20 −95 spec/search_spec.rb
View
@@ -80,6 +80,7 @@ def print_statuses(statuses)
end
print_table(array)
else
+ ENV['THOR_COLUMNS'] = "80"
if STDOUT.tty? && !options['no-color']
statuses.each do |status|
say(" #{Thor::Shell::Color::BOLD}@#{status.user.screen_name}", :yellow)
@@ -89,7 +90,10 @@ def print_statuses(statuses)
end
else
statuses.each do |status|
- say "#{status.user.screen_name.rjust(MAX_SCREEN_NAME_SIZE)}: #{status.text.gsub(/\n+/, ' ')} (#{time_ago_in_words(status.created_at)} ago)"
+ say(" @#{status.user.screen_name}")
+ Thor::Shell::Basic.new.print_wrapped(status.text, :indent => 3)
+ say(" #{time_ago_in_words(status.created_at)} ago")
+ say
end
end
end
Oops, something went wrong.

0 comments on commit 0be1daa

Please sign in to comment.