Project

General

Profile

Actions

Bug #1171

closed

ri: if "pager" exists, use it before trying less.

Added by lucas (Lucas Nussbaum) about 15 years ago. Updated about 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9.1p0
Backport:
[ruby-core:22211]

Description

=begin
Hi,

On Debian/Ubuntu, "pager" points to the preferred system pager.
It should be tried before "less".

This patch is used in the Debian package.

diff -urNad ruby1.9-1.9.0.1~/lib/rdoc/ri/display.rb ruby1.9-1.9.0.1/lib/rdoc/ri/display.rb
--- ruby1.9-1.9.0.1~/lib/rdoc/ri/display.rb 2008-01-31 15:48:35.000000000 +0900
+++ ruby1.9-1.9.0.1/lib/rdoc/ri/display.rb 2008-03-06 11:35:27.000000000 +0900
@@ -192,7 +192,7 @@

def setup_pager
  unless @use_stdout then
  •  for pager in [ ENV['PAGER'], "less", "more", 'pager' ].compact.uniq
    
  •  for pager in [ ENV['PAGER'], "pager", "less", "more" ].compact.uniq
       return IO.popen(pager, "w") rescue nil
     end
     @use_stdout = true
    

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0