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