diff --git a/iris.rb b/iris.rb index 40ebae0..bc9a81a 100755 --- a/iris.rb +++ b/iris.rb @@ -299,7 +299,8 @@ class Message end class Display - WIDTH = 80 + MIN_WIDTH = 80 + WIDTH = [ENV['COLUMNS'].to_i, `tput cols`.chomp.to_i, MIN_WIDTH].compact.max def self.topic_index_width Corpus.topics.size.to_s.length