chiark / gitweb /
Use a pager for diff and show commands
[stgit] / stgit / config.py
index e28633dbe408b711ca4e9c3b41822dd650c5724e..66e9f41044631264c2740f61ddafbc4bd01ec71a 100644 (file)
@@ -40,6 +40,10 @@ config.read('/etc/stgitrc')
 config.read(os.path.expanduser('~/.stgitrc'))
 config.read(os.path.join(basedir.get(), 'stgitrc'))
 
+# Set the PAGER environment to the config value (if any)
+if config.has_option('stgit', 'pager'):
+    os.environ['PAGER'] = config.get('stgit', 'pager')
+
 # [gitmergeonefile] section is deprecated. In case it exists copy the
 # options/values to the [stgit] one
 if config.has_section('gitmergeonefile'):