diff --git a/iris.rb b/iris.rb index bc9a81a..0bccf83 100755 --- a/iris.rb +++ b/iris.rb @@ -322,7 +322,7 @@ class Display end class Interface - ONE_SHOTS = %w{help topics compose quit freshen reply} + ONE_SHOTS = %w{help topics compose quit freshen reset_display reply} CMD_MAP = { 't' => 'topics', 'topics' => 'topics', @@ -337,6 +337,8 @@ class Interface 'quit' => 'quit', 'freshen' => 'freshen', 'f' => 'freshen', + 'reset' => 'reset_display', + 'clear' => 'reset_display', } def browsing_handler(line) @@ -352,6 +354,10 @@ class Interface nil end + def reset_display + puts `tput reset`.chomp + end + def reply(topic_id = nil) topic_id ||= @reply_topic unless topic_id @@ -478,6 +484,7 @@ class Interface puts 'compose, c - Add a new topic' puts 'reply #, r # - Reply to a specific topic' puts 'freshen, f - Reload to get any new messages' + puts 'reset, clear - Fix screen in case of text corruption' puts end