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
|
end
|
||||||
|
|
||||||
class Interface
|
class Interface
|
||||||
ONE_SHOTS = %w{help topics compose quit freshen reply}
|
ONE_SHOTS = %w{help topics compose quit freshen reset_display reply}
|
||||||
CMD_MAP = {
|
CMD_MAP = {
|
||||||
't' => 'topics',
|
't' => 'topics',
|
||||||
'topics' => 'topics',
|
'topics' => 'topics',
|
||||||
|
@ -337,6 +337,8 @@ class Interface
|
||||||
'quit' => 'quit',
|
'quit' => 'quit',
|
||||||
'freshen' => 'freshen',
|
'freshen' => 'freshen',
|
||||||
'f' => 'freshen',
|
'f' => 'freshen',
|
||||||
|
'reset' => 'reset_display',
|
||||||
|
'clear' => 'reset_display',
|
||||||
}
|
}
|
||||||
|
|
||||||
def browsing_handler(line)
|
def browsing_handler(line)
|
||||||
|
@ -352,6 +354,10 @@ class Interface
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reset_display
|
||||||
|
puts `tput reset`.chomp
|
||||||
|
end
|
||||||
|
|
||||||
def reply(topic_id = nil)
|
def reply(topic_id = nil)
|
||||||
topic_id ||= @reply_topic
|
topic_id ||= @reply_topic
|
||||||
unless topic_id
|
unless topic_id
|
||||||
|
@ -478,6 +484,7 @@ class Interface
|
||||||
puts 'compose, c - Add a new topic'
|
puts 'compose, c - Add a new topic'
|
||||||
puts 'reply #, r # - Reply to a specific topic'
|
puts 'reply #, r # - Reply to a specific topic'
|
||||||
puts 'freshen, f - Reload to get any new messages'
|
puts 'freshen, f - Reload to get any new messages'
|
||||||
|
puts 'reset, clear - Fix screen in case of text corruption'
|
||||||
puts
|
puts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue