pager setting in configuration file overrides $PAGER environment variable
This commit is contained in:
parent
f311c8fa61
commit
d1e2fb3ab3
7
jsvn
7
jsvn
@ -59,7 +59,7 @@ def read_config_file(config, path):
|
||||
|
||||
def get_config(svn):
|
||||
config = {
|
||||
'pager': 'less -FRX',
|
||||
'pager': '',
|
||||
'use_pager': True,
|
||||
'use_color': True,
|
||||
'aliases': {
|
||||
@ -1056,9 +1056,12 @@ def main(argv):
|
||||
if (len(argv) >= 1 and argv[0] in
|
||||
('blame', 'cat', 'diff', 'help', 'list', 'log',
|
||||
'propget', 'proplist')):
|
||||
if config['pager'] != '':
|
||||
pager = config['pager']
|
||||
if 'PAGER' in os.environ and os.environ['PAGER'] != '':
|
||||
elif 'PAGER' in os.environ and os.environ['PAGER'] != '':
|
||||
pager = os.environ['PAGER']
|
||||
else:
|
||||
pager = 'less -FRX'
|
||||
pager_proc = Popen(pager, shell=True, stdin=PIPE)
|
||||
out = pager_proc.stdin
|
||||
using_pager = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user