Module | Pry::Helpers::BaseHelpers |
In: |
lib/pry/helpers/base_helpers.rb
|
Create scrollable output via less!
This command runs `less` in a subprocess, and gives you the IO to its STDIN pipe so that you can communicate with it.
Example:
lesspipe do |less| 50.times { less.puts "Hi mom!" } end
The default less parameters are:
You can change these options by passing a hash to `lesspipe`, like so:
lesspipe(:wrap=>false) { |less| less.puts essay.to_s }
It accepts the following boolean options:
:color => Allow ANSI colour codes? :wrap => Wrap long lines? :always => Always page, even if there's less than one page of text?
Try to use `less` for paging, if it fails then use simple_pager. Also do not page if Pry.pager is falsey FIXME! Another JRuby hack