mirror of https://github.com/Calamitous/iris.git
Add command to clear screen
This commit is contained in:
parent
e5743e6562
commit
9f9e4149d2
9
iris.rb
9
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue