From c95df626228a7158a159018a38280a97d49accf1 Mon Sep 17 00:00:00 2001 From: yan Date: Tue, 20 Dec 2011 01:34:20 -0800 Subject: [PATCH] Added paging to pryrc by default See pryrc comments for how to disable. --- irb/pryrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/irb/pryrc b/irb/pryrc index d1d77cb2..b24329ea 100644 --- a/irb/pryrc +++ b/irb/pryrc @@ -21,7 +21,12 @@ Pry.config.ls.private_method_color = :bright_black # look at ~/.aprc for more settings for awesome_print begin require 'awesome_print' - Pry.config.print = proc { |output, value| output.puts value.ai } + # The following line enables awesome_print for all pry output, + # and it also enables paging + Pry.config.print = proc {|output, value| Pry::Helpers::BaseHelpers.stagger_output("=> #{value.ai}", output)} + + # If you want awesome_print without automatic pagination, use the line below + # Pry.config.print = proc { |output, value| output.puts value.ai } rescue LoadError => err puts "gem install awesome_print # <-- highly recommended" end