[ditz-talk] [PATCH] Don't ignore don't-page-when-short when LESS env var is set

Daniel Kalør daniel at kalor.dk
Wed Nov 5 03:28:08 EST 2008


---
 lib/ditz.rb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/lib/ditz.rb b/lib/ditz.rb
index 8c17ed3..7227447 100644
--- a/lib/ditz.rb
+++ b/lib/ditz.rb
@@ -86,8 +86,7 @@ def run_pager
   read.close
   write.close
 
-  ENV['LESS'] ||= 'FSRX'  # Don't page if the input is short enough, unless
-                          # the user already have a LESS variable.
+  ENV['LESS'] += ' FSRX'  # Don't page if the input is short enough
 
   Kernel.select [STDIN] # Wait until we have input before we start the pager
   pager = ENV['PAGER'] || 'less'
-- 
1.6.0.3



More information about the ditz-talk mailing list