Set the LESS environment if the pager is 'less'
[stgit] / stgit / config.py
index f205e5b..4a6cb3b 100644 (file)
@@ -37,7 +37,7 @@ class GitConfig:
         'stgit.keepoptimized': 'no',
         'stgit.extensions':    '.ancestor .current .patched',
         'stgit.shortnr': '5',
-        'stgit.pager':  'less -FRSX'
+        'stgit.pager':  'less'
         }
 
     __cache = None
@@ -121,6 +121,7 @@ def config_setup():
     global config
 
     os.environ.setdefault('PAGER', config.get('stgit.pager'))
+    os.environ.setdefault('LESS', '-FRSX')
     # FIXME: handle EDITOR the same way ?
 
 class ConfigOption: