Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (39 sloc) 1.545 kB
diff --git a/lib/plugins/another_prompt.rb b/lib/plugins/another_prompt.rb
index 702c235..d692a72 100644
--- a/lib/plugins/another_prompt.rb
+++ b/lib/plugins/another_prompt.rb
@@ -94,6 +94,8 @@ module Termtter
def call_prompt(command)
Client.call_commands("curry #{command}")
if buf = Readline.readline(ERB.new(prompt).result(Termtter::API.twitter.__send__(:binding)), true)
+ Readline.delete_text
+ Readline.set_prompt('')
Readline::HISTORY.pop if buf.empty?
begin
call(buf)
diff --git a/lib/plugins/defaults/command_line.rb b/lib/plugins/defaults/command_line.rb
index f0166c7..bdac10a 100644
--- a/lib/plugins/defaults/command_line.rb
+++ b/lib/plugins/defaults/command_line.rb
@@ -49,6 +49,8 @@ module Termtter
trap_setting()
@input_thread = Thread.new do
while buf = Readline.readline(ERB.new(prompt).result(Termtter::API.twitter.__send__(:binding)), true)
+ Readline.delete_text
+ Readline.set_prompt('')
Readline::HISTORY.pop if buf.empty?
begin
call(buf)
diff --git a/lib/termtter/client.rb b/lib/termtter/client.rb
index 28d6913..c5eaf3e 100644
--- a/lib/termtter/client.rb
+++ b/lib/termtter/client.rb
@@ -363,6 +363,8 @@ module Termtter
"\"#{message}".strip + "\" [N/y] "
end
readline = Readline.readline(prompt, false)
+ Readline.delete_text
+ Readline.set_prompt('')
result =
if !!(/^$/ =~ readline)
default_yes
Jump to Line
Something went wrong with that request. Please try again.