amazing-print / amazing_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
MIT License
783 stars 33 forks source link

Use pager with Pry #96

Closed HarlemSquirrel closed 1 year ago

HarlemSquirrel commented 1 year ago

Closes #78

We can enable (default) or disable the pager in Pry like so

Pry.configure do |config|                                                                            
  config.pager = true                                                                                
end

We can start a pry session like

ruby -e 'require "pry"; binding.pry'
pry(main)> ("A".."z").to_a

With pager enabled now we get paging with AmazingPrint.

image

Without paging we get the output scrolled with terminal scrollback image