Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pager with Pry #96

Merged
merged 2 commits into from
May 25, 2023
Merged

Use pager with Pry #96

merged 2 commits into from
May 25, 2023

Conversation

HarlemSquirrel
Copy link
Member

@HarlemSquirrel HarlemSquirrel commented May 24, 2023

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

@HarlemSquirrel HarlemSquirrel marked this pull request as ready for review May 25, 2023 00:42
@HarlemSquirrel HarlemSquirrel requested a review from paddor May 25, 2023 00:42
@paddor paddor merged commit 63a863b into master May 25, 2023
@paddor paddor deleted the pry-pager branch May 25, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use paging with Pry?
2 participants