You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pry implicitly uses stdout for pagination, which is guaranteed incorrect when using pry in a non-stdout pty (ie. via PTY.open). It should use the configured output in that case.
Using MRI, I get the system pager less. Note that the pagination incorrectly appears in terminal 1 (the server).
(type q on terminal 1, then $pty_exit = true, enter, then ctrl-c on terminal 2 to exit)
Using JRuby, I get the pry simple pager. Note that the pagination correctly appears in terminal 2 (the client) in this case, and you can type enter/q for more, but note that https://github.com/pry/pry/blob/master/lib/pry/pager.rb#L116 directly assumes Readline is configured. I previously had a Readline2 with the pty, and Readline with stdio, which incorrectly requested input from Terminal 1 (the server). The current script works fine though, as I configured the global Readline class to use the pty.
The text was updated successfully, but these errors were encountered:
Thanks for the detailed description. This seems to be a tough nut to crack. We pipe Pry output to less and apparently it runs on the server. I'm not sure how to use less on the client but any ideas are welcome.
Pry on JRuby always uses SimplePager. It doesn't shell out to less, so it works fine for your scenario. Perhaps, the correct solution would be preferring SimplePager in the client-server scenario or not paging at all.
Pry implicitly uses stdout for pagination, which is guaranteed incorrect when using pry in a non-stdout pty (ie. via PTY.open). It should use the configured output in that case.
Environment:
Setup (Terminal 1):
Setup (Terminal 2):
Using MRI, I get the system pager
less
. Note that the pagination incorrectly appears in terminal 1 (the server).(type
q
on terminal 1, then$pty_exit = true
, enter, then ctrl-c on terminal 2 to exit)Using JRuby, I get the pry simple pager. Note that the pagination correctly appears in terminal 2 (the client) in this case, and you can type enter/q for more, but note that https://github.com/pry/pry/blob/master/lib/pry/pager.rb#L116 directly assumes Readline is configured. I previously had a Readline2 with the pty, and Readline with stdio, which incorrectly requested input from Terminal 1 (the server). The current script works fine though, as I configured the global Readline class to use the pty.
The text was updated successfully, but these errors were encountered: