class Pry::Pager::SystemPager

Public Instance Methods

fast_exit!() click to toggle source
# File lib/pry/pager/system_pager.rb, line 11
def fast_exit!
  Process.kill 'SIGKILL', pid
  Process.wait pid
end
fork() click to toggle source
# File lib/pry/pager/system_pager.rb, line 6
def fork
  pager
  nil
end
pid() click to toggle source
# File lib/pry/pager/system_pager.rb, line 2
def pid
  pager.pid
end

Private Instance Methods

pager() click to toggle source

Patch to avoid spawning a shell when launching the pager.

# File lib/pry/pager/system_pager.rb, line 18
def pager
  @pager ||= begin
    ary = self.class.default_pager.split(' ')
    io = IO.popen(ary, 'w')
    io.tap{|io| io.sync = true}
  end
end