File: pager.patch

package info (click to toggle)
ruby-ghi 1.2.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 456 kB
  • sloc: ruby: 5,268; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Last-Update: 2016-04-25
Forwarded: not-needed
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: use default `pager` through alternatives instead of `less`.

--- a/lib/ghi/formatting.rb
+++ b/lib/ghi/formatting.rb
@@ -47,9 +47,9 @@
     def page header = nil, throttle = 0
       if paginate?
         pager   = GHI.config('ghi.pager') || GHI.config('core.pager')
         pager ||= ENV['PAGER']
-        pager ||= 'less'
+        pager ||= 'pager'
         pager  += ' -EKRX -b1' if pager =~ /^less( -[EKRX]+)?$/
 
         if pager && !pager.empty? && pager != 'cat'
           $stdout = IO.popen pager, 'w'