Method: Pssh::Pty#resize!
- Defined in:
- lib/pssh/pty.rb
#resize! ⇒ Object
Public: Resizes the PTY session based on all the open windows.
Returns nothing.
117 118 119 120 121 122 123 |
# File 'lib/pssh/pty.rb', line 117 def resize! winsizes = Pssh.socket.sessions.values.map { |sess| sess[:winsize] } winsizes << $stdout.winsize if new? y = winsizes.map { |w| w[0] }.min x = winsizes.map { |w| w[1] }.min @write.winsize = [ y, x ] end |