diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 5dc0e7e5..b16d0a20 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -257,6 +257,14 @@ class Pry end end + def self.auto_resize! + trap :WINCH do + size = `stty size`.split(/\s+/).map &:to_i + Readline.set_screen_size *size + Readline.refresh_line + end + end + def self.set_config_defaults config.input = Readline config.output = $stdout