Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't call stdout_hook when it's a pty or quiet mode

  • Loading branch information...
commit f229104dec1f193b24b7c004cf1aaa31badb5eed 1 parent 833e9bf
@delano authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/rye/box.rb
View
9 lib/rye/box.rb
@@ -912,12 +912,17 @@ def state_await_input(channel)
begin
list = self.commands.sort
- comp = proc { |s| list.grep( /^#{Regexp.escape(s)}/ ) }
+ comp = proc { |s|
+ # TODO: Something here for files
+ list.grep( /^#{Regexp.escape(s)}/ )
+ }
Readline.completion_append_character = " "
Readline.completion_proc = comp
ret = Readline.readline(channel[:prompt] || '', true)
+ #ret = STDIN.gets
+
if ret.nil?
channel[:state] = :exit
else
@@ -992,7 +997,7 @@ def create_channel()
}
channel.on_data { |ch, data|
channel[:handler] = ":on_data"
- @rye_stdout_hook.call(data) if @rye_stdout_hook.kind_of?(Proc)
+ @rye_stdout_hook.call(data) if !@rye_pty && !@rye_quiet && @rye_stdout_hook.kind_of?(Proc)
if rye_pty && data =~ /password/i
channel[:prompt] = data
channel[:state] = :await_input
Please sign in to comment.
Something went wrong with that request. Please try again.